X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fmodulecache.h;fp=source%2Fglsl%2Fmodulecache.h;h=ba892f93ec9ca0c2ec563ec7e6090bb6b70d17fb;hb=f901fcf41d8ca544085f448227f84bc6f966660d;hp=0000000000000000000000000000000000000000;hpb=e484dab089e86e889f007ad362f72337542015a0;p=libs%2Fgl.git diff --git a/source/glsl/modulecache.h b/source/glsl/modulecache.h new file mode 100644 index 00000000..ba892f93 --- /dev/null +++ b/source/glsl/modulecache.h @@ -0,0 +1,33 @@ +#ifndef MSP_GL_SL_MODULECACHE_H_ +#define MSP_GL_SL_MODULECACHE_H_ + +#include +#include "syntax.h" + +namespace Msp { +namespace GL { +namespace SL { + +class ModuleCache +{ +private: + DataFile::Collection *resources; + std::map modules; + unsigned next_source; + +public: + ModuleCache(DataFile::Collection *); + ModuleCache(const ModuleCache &); + ModuleCache &operator=(const ModuleCache &); + ~ModuleCache(); + + const Module &add_module(const std::string &, const std::string &); + const Module &add_module(IO::Base &, const std::string &); + const Module &get_module(const std::string &); +}; + +} // namespace SL +} // namespace GL +} // namespace Msp + +#endif