]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/sourcemap.h
Track source names in SL::Module
[libs/gl.git] / source / glsl / sourcemap.h
1 #ifndef MSP_GL_SL_SOURCEMAP_H_
2 #define MSP_GL_SL_SOURCEMAP_H_
3
4 #include <string>
5 #include <vector>
6
7 namespace Msp {
8 namespace GL {
9 namespace SL {
10
11 class SourceMap
12 {
13 private:
14         unsigned base_index;
15         std::vector<std::string> source_names;
16
17 public:
18         SourceMap();
19
20         void set_name(unsigned, const std::string &);
21         unsigned get_count() const { return base_index+source_names.size(); }
22         void merge_from(const SourceMap &);
23         std::string translate_errors(const std::string &) const;
24 };
25
26 } // namespace SL
27 } // namespace GL
28 } // namespace Msp
29
30 #endif