aboutsummaryrefslogtreecommitdiff
path: root/source/20-codegen-compiler/CodegenModelArchive.hpp
blob: 0e0e5ad839705c1a01e025b30892f612504ba191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "CodegenDecl.hpp"
#include "CodegenModel.hpp"

#include <sqlite3.h>
#include <string_view>

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);
};