blob: e67f4d9cdba80ce8865b5096c500eacfb8ea45f5 (
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
26
27
28
29
30
31
|
#pragma once
#include "CodegenDecl.hpp"
#include "CodegenModel.hpp"
#include <sqlite3.h>
#include <cstdint>
#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 DeleteDeclsRelatedToFile(std::string_view filename);
void Store(const CodegenModel& model);
void LoadInto(CodegenModel& model) const;
CodegenModel Load() const;
void StoreStruct(const DeclStruct& decl);
void StoreFunction(const DeclFunction& decl);
void StoreEnum(const DeclEnum& decl);
};
|