diff options
Diffstat (limited to 'source/20-codegen-compiler/CodegenModelArchive.hpp')
-rw-r--r-- | source/20-codegen-compiler/CodegenModelArchive.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/20-codegen-compiler/CodegenModelArchive.hpp b/source/20-codegen-compiler/CodegenModelArchive.hpp new file mode 100644 index 0000000..261d82b --- /dev/null +++ b/source/20-codegen-compiler/CodegenModelArchive.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "CodegenDecl.hpp" +#include "CodegenModel.hpp" + +#include <sqlite3.h> +#include <string_view> + +namespace Utils { +sqlite3_stmt* NewSqliteStatement(sqlite3* database, std::string_view sql); +} // namespace Utils + +class CodegenModelArchive { +private: + class Private; + Private* m; + +public: + CodegenModelArchive(std::string_view dbPath); + ~CodegenModelArchive(); + + // Implementation detail helper, don't use outside + Private& GetPimpl() const { return *m; } + + void Store(const CodegenModel& cgInput); + void StoreStruct(const DeclStruct& decl); + void StoreFunction(const DeclFunction& decl); + void StoreEnum(const DeclEnum& decl); +}; |