int AddMovie(std::string &movieName) { nameArray.Write(&movieName, 1); unsigned int id = nameArray.size(); idArray.Write(&id, 1); return id; }
void HDFCmpExperimentGroup::AddTags(const std::vector<char> &qualityValues, const std::string &fieldName, unsigned int *offsetBegin, unsigned int *offsetEnd) { std::vector<char> paddedQualityValues = qualityValues; paddedQualityValues.push_back(0); HDFArray<char> *arrayPtr = NULL; if (fieldName == "DeletionTag") { arrayPtr = &deletionTag; } else if (fieldName == "SubstitutionTag") { arrayPtr = &substitutionTag; } else { assert(false); } if (!arrayPtr->isInitialized) arrayPtr->Initialize(experimentGroup, fieldName); *offsetBegin = arrayPtr->size(); *offsetEnd = arrayPtr->size() + qualityValues.size(); arrayPtr->Write(&paddedQualityValues[0], paddedQualityValues.size()); }