Vuo 2.4.4
Loading...
Searching...
No Matches
VuoModuleCompiler.hh
Go to the documentation of this file.
1
10#pragma once
11
15class VuoCompilerType;
16
21{
22public:
23 static VuoModuleCompiler * newModuleCompiler(const string &type, const string &moduleKey, const string &sourcePath, const VuoModuleCompilerSettings &settings, std::function<VuoCompilerType *(const string &)> getVuoType);
24 virtual ~VuoModuleCompiler(void);
25
32 virtual VuoModuleCompilerResults compile(dispatch_queue_t llvmQueue, VuoCompilerIssues *issues) = 0;
33
34 virtual string generateHeader(VuoCompilerIssues *issues);
35
41 virtual void overrideSourceCode(const string &sourceCode, const string &sourcePath) = 0;
42
43protected:
47 typedef VuoModuleCompiler *(*Factory)(const string &moduleKey, const string &sourcePath, const VuoModuleCompilerSettings &settings);
48
49 static void registerModuleCompiler(string type, Factory factory);
50 VuoModuleCompiler(const string &moduleKey, const string &sourcePath, const VuoModuleCompilerSettings &settings);
51 VuoCompilerType * lookUpVuoType(const string &typeName);
52
53 string moduleKey;
54 string sourcePath;
56 map<string, VuoCompilerType *> vuoTypes;
57
58private:
59 static void loadAllModuleCompilers(void);
60
61 static map<string, Factory> *factories;
62 std::function<VuoCompilerType *(const string &)> getVuoType;
63};