Joedb 10.4.6
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::generator::Generator Class Referenceabstract

#include <joedb/compiler/generator/Generator.h>

Inheritance diagram for joedb::generator::Generator:
Collaboration diagram for joedb::generator::Generator:

Public Member Functions

 Generator (std::string dir_name, std::string file_name, const Compiler_Options &options)
virtual void write (std::ostream &out)=0
void generate ()
virtual ~Generator ()

Protected Member Functions

bool db_has_values () const
bool table_has_field_type (Table_Id table_id, Type::Type_Id type_id) const
void write_initial_comment (std::ostream &out)
void write_type (std::ostream &out, Type type, bool return_type, bool setter_type)
void write_tuple_type (std::ostream &out, const Compiler_Options::Index &index, bool reference)

Static Protected Member Functions

static const char * get_type_string (Type type)
static const char * get_cpp_type_string (Type type)
static const char * get_storage_type_string (Type type)

Protected Attributes

const std::string dir_name
const std::string file_name
const Compiler_Options & options

Detailed Description

Definition at line 11 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator()

joedb::generator::Generator::Generator ( std::string dir_name,
std::string file_name,
const Compiler_Options & options )

Definition at line 187 of file Generator.cpp.

◆ ~Generator()

joedb::generator::Generator::~Generator ( )
virtualdefault

Member Function Documentation

◆ db_has_values()

bool joedb::generator::Generator::db_has_values ( ) const
protected

Definition at line 11 of file Generator.cpp.

◆ generate()

void joedb::generator::Generator::generate ( )

Definition at line 201 of file Generator.cpp.

◆ get_cpp_type_string()

const char * joedb::generator::Generator::get_cpp_type_string ( Type type)
staticprotected

Definition at line 156 of file Generator.cpp.

◆ get_storage_type_string()

const char * joedb::generator::Generator::get_storage_type_string ( Type type)
staticprotected

Definition at line 170 of file Generator.cpp.

◆ get_type_string()

const char * joedb::generator::Generator::get_type_string ( Type type)
staticprotected

Definition at line 142 of file Generator.cpp.

◆ table_has_field_type()

bool joedb::generator::Generator::table_has_field_type ( Table_Id table_id,
Type::Type_Id type_id ) const
protected

Definition at line 23 of file Generator.cpp.

◆ write()

◆ write_initial_comment()

void joedb::generator::Generator::write_initial_comment ( std::ostream & out)
protected

Definition at line 33 of file Generator.cpp.

◆ write_tuple_type()

void joedb::generator::Generator::write_tuple_type ( std::ostream & out,
const Compiler_Options::Index & index,
bool reference )
protected

Definition at line 92 of file Generator.cpp.

◆ write_type()

void joedb::generator::Generator::write_type ( std::ostream & out,
Type type,
bool return_type,
bool setter_type )
protected

Definition at line 50 of file Generator.cpp.

Member Data Documentation

◆ dir_name

const std::string joedb::generator::Generator::dir_name
protected

Definition at line 14 of file Generator.h.

◆ file_name

const std::string joedb::generator::Generator::file_name
protected

Definition at line 15 of file Generator.h.

◆ options

const Compiler_Options& joedb::generator::Generator::options
protected

Definition at line 16 of file Generator.h.


The documentation for this class was generated from the following files: