OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
t_html_generator Class Reference
Inheritance diagram for t_html_generator:
Collaboration diagram for t_html_generator:

Public Member Functions

 t_html_generator (t_program *program, const std::map< std::string, std::string > &parsed_options, const std::string &option_string)
 
void generate_program ()
 
void generate_xml ()
 
void generate_field_xml (t_field *tfl)
 
void generate_struct_xml (const string &stname)
 
void generate_sandesh_xml (t_sandesh *tsnd)
 
void generate_typedef (t_typedef *ttypedef)
 
void generate_enum (t_enum *tenum)
 
void generate_const (t_const *tconst)
 
void generate_struct (t_struct *tstruct)
 
void generate_service (t_service *tservice)
 
- Public Member Functions inherited from t_generator
 t_generator (t_program *program)
 
virtual ~t_generator ()
 
const t_programget_program () const
 
void generate_docstring_comment (std::ofstream &out, const std::string &comment_start, const std::string &line_prefix, const std::string &contents, const std::string &comment_end)
 
virtual std::string escape_string (const std::string &in) const
 
std::string get_escaped_string (t_const_value *constval)
 

Public Attributes

std::ofstream f_out_
 

Additional Inherited Members

- Static Public Member Functions inherited from t_generator
static bool is_valid_namespace (const std::string &sub_namespace)
 
static t_typeget_true_type (t_type *type)
 
- Protected Member Functions inherited from t_generator
virtual void init_generator ()
 
virtual void close_generator ()
 
virtual void generate_consts (std::vector< t_const * > consts)
 
virtual void generate_xception (t_struct *txception)
 
virtual std::string get_program_name (t_program *tprogram)
 
virtual std::string get_service_name (t_service *tservice)
 
virtual std::string get_out_dir () const
 
std::string tmp (std::string name)
 
void indent_up ()
 
void indent_down ()
 
std::string indent ()
 
std::ostream & indent (std::ostream &os)
 
std::string capitalize (std::string in)
 
std::string decapitalize (std::string in)
 
std::string lowercase (std::string in)
 
std::string uppercase (std::string in)
 
std::string underscore (std::string in)
 
std::string camelcase (std::string in)
 
- Protected Attributes inherited from t_generator
t_programprogram_
 
std::string program_name_
 
std::string service_name_
 
std::string out_dir_base_
 
std::map< char, std::string > escape_
 

Detailed Description

HTML code generator

mostly copy/pasting/tweaking from mcslee's work.

Definition at line 42 of file t_html_generator.cc.

Constructor & Destructor Documentation

t_html_generator::t_html_generator ( t_program program,
const std::map< std::string, std::string > &  parsed_options,
const std::string &  option_string 
)
inline

Definition at line 44 of file t_html_generator.cc.

Member Function Documentation

void t_html_generator::generate_const ( t_const tconst)
inlinevirtual

Reimplemented from t_generator.

Definition at line 66 of file t_html_generator.cc.

void t_html_generator::generate_enum ( t_enum tenum)
inlinevirtual

Implements t_generator.

Definition at line 65 of file t_html_generator.cc.

void t_html_generator::generate_field_xml ( t_field tfl)

Program-level generation functions

Definition at line 94 of file t_html_generator.cc.

Here is the call graph for this function:

void t_html_generator::generate_program ( )
virtual

Prepares for file generation by opening up the necessary file output stream.

Reimplemented from t_generator.

Definition at line 169 of file t_html_generator.cc.

void t_html_generator::generate_sandesh_xml ( t_sandesh tsnd)

Definition at line 127 of file t_html_generator.cc.

Here is the call graph for this function:

void t_html_generator::generate_service ( t_service tservice)
inlinevirtual

Implements t_generator.

Definition at line 71 of file t_html_generator.cc.

void t_html_generator::generate_struct ( t_struct tstruct)
inlinevirtual

Implements t_generator.

Definition at line 67 of file t_html_generator.cc.

void t_html_generator::generate_struct_xml ( const string &  stname)

Definition at line 76 of file t_html_generator.cc.

Here is the call graph for this function:

void t_html_generator::generate_typedef ( t_typedef ttypedef)
inlinevirtual

Pure virtual methods implemented by the generator subclasses.

Implements t_generator.

Definition at line 64 of file t_html_generator.cc.

void t_html_generator::generate_xml ( )

Definition at line 139 of file t_html_generator.cc.

Member Data Documentation

std::ofstream t_html_generator::f_out_

Definition at line 73 of file t_html_generator.cc.


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