4 * Created on: Aug 3, 2009
18 typedef std::pair<uint32_t, uint32_t> U32Pair;
21 ReferenceMap(const char *fname, bool parseNames) {
23 parseNames_ = parseNames;
28 * Give a reference coordinate in the index, translate it into a
29 * new reference coordinate via the reference map supplied by the
32 void map(U32Pair& h) const;
35 * Return true iff we have a name for reference with id 'i'.
37 bool hasName(size_t i) const {
38 if(!parseNames_) return false;
39 return !names_[i].empty();
43 * Get the name for reference with id 'i'.
45 const std::string& getName(size_t i) const {
54 * Parse a reference-map file.
59 std::vector<U32Pair> map_;
61 std::vector<std::string> names_;
64 #endif /* REFMAP_H_ */