converted OggVorbisStream to use assman
[laserbrain_demo] / src / datamap.h
1 #ifndef DATAMAP_H_
2 #define DATAMAP_H_
3
4 #include <vector>
5 #include <map>
6 #include <string>
7
8 class DataMap {
9         std::vector<std::pair<std::string, std::string>> dmap;
10         mutable std::map<std::string, std::string> cache;
11         std::string root;
12         bool strip_paths;
13
14 public:
15         DataMap();
16
17         void clear();
18
19         void set_path(const char *path);
20         void set_strip(bool s);
21
22         bool load_map(const char *fname);
23         void map(const char *match, const char *path);
24
25         int lookup(const char *in, char *buf, int bsz) const;
26         int path_size(const char *in) const;
27 };
28
29 #endif  // DATAMAP_H_