template <typename StorageSet,typename ReadSet> void mergeKeysFromStorageSet(StorageSet &ss, const ReadSet&other) { int len = other.reads_size(); int sslen = ss.reads_size(); int i; for (i=0;i<sslen;++i) { mergeStorageKey(ss.mutable_reads(i),other.reads(i)); } for (;i<len;++i) { ss.add_reads(); mergeStorageKey(ss.mutable_reads(i),other.reads(i)); } }
template<class StorageX, class StorageY> void mergeCompareElement(StorageX a, const StorageY b) { mergeStorageKey(a,b); mergeStorageValue(a,b); if (b.has_comparator()) { a.set_comparator(a.comparator()); } }
template<class StorageX, class StorageY> void mergeStorageElement(StorageX a, const StorageY b) { mergeStorageKey(a,b); mergeStorageValue(a,b); }