]> git.tdb.fi Git - libs/gl.git/blob - source/glsl/sourcemap.h
Use default member initializers for simple types
[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 = 0;
15         std::vector<std::string> source_names;
16
17 public:
18         void set_name(unsigned, const std::string &);
19         unsigned get_count() const { return base_index+source_names.size(); }
20         const std::string &get_name(unsigned) const;
21         void merge_from(const SourceMap &);
22         std::string translate_errors(const std::string &) const;
23 };
24
25 } // namespace SL
26 } // namespace GL
27 } // namespace Msp
28
29 #endif