Joedb 10.3.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
joedb::generator::Generator Class Referenceabstract

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

Inheritance diagram for joedb::generator::Generator:
Inheritance graph
[legend]
Collaboration diagram for joedb::generator::Generator:
Collaboration graph
[legend]

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
 
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)
 
void write_index_type (std::ostream &out, const Compiler_Options::Index &index)
 

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_Optionsoptions
 

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.

◆ write()

virtual void joedb::generator::Generator::write ( std::ostream &  out)
pure virtual

◆ write_index_type()

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

Definition at line 116 of file Generator.cpp.

◆ write_initial_comment()

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

Definition at line 23 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 72 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 40 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: