Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Generator.h
Go to the documentation of this file.
1#ifndef joedb_generator_Generator_declared
2#define joedb_generator_Generator_declared
3
5
6#include <fstream>
7
8namespace joedb::generator
9{
10 /// @ingroup compiler
12 {
13 protected:
15 std::ofstream out;
16
17 bool db_has_values() const;
18
20 void write_type(Type type, bool return_type, bool setter_type);
23
24 static const char *get_type_string(Type type);
25 static const char *get_cpp_type_string(Type type);
26 static const char *get_storage_type_string(Type type);
27
28 public:
30 (
31 const char *dir_name,
32 const char *file_name,
34 );
35
36 virtual void generate() = 0;
37
38 virtual ~Generator();
39 };
40}
41
42#endif
void write_index_type(const Compiler_Options::Index &index)
static const char * get_storage_type_string(Type type)
static const char * get_type_string(Type type)
void write_tuple_type(const Compiler_Options::Index &index)
Definition Generator.cpp:71
virtual void generate()=0
void write_type(Type type, bool return_type, bool setter_type)
Definition Generator.cpp:42
static const char * get_cpp_type_string(Type type)
const Compiler_Options & options
Definition Generator.h:14
One code generator for each of the file generated by joedbc.
Definition Client_h.cpp:5