OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
t_oop_generator Class Reference

#include <t_oop_generator.h>

Inheritance diagram for t_oop_generator:
Collaboration diagram for t_oop_generator:

Public Member Functions

 t_oop_generator (t_program *program)
 
void scope_up (std::ostream &out)
 
void scope_down (std::ostream &out)
 
std::string upcase_string (std::string original)
 
virtual std::string autogen_comment ()
 
- Public Member Functions inherited from t_generator
 t_generator (t_program *program)
 
virtual ~t_generator ()
 
virtual void generate_program ()
 
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)
 

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_typedef (t_typedef *ttypedef)=0
 
virtual void generate_enum (t_enum *tenum)=0
 
virtual void generate_const (t_const *tconst)
 
virtual void generate_struct (t_struct *tstruct)=0
 
virtual void generate_service (t_service *tservice)=0
 
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

Class with utility methods shared across common object oriented languages. Specifically, most of this stuff is for C++/Java.

Definition at line 37 of file t_oop_generator.h.

Constructor & Destructor Documentation

t_oop_generator::t_oop_generator ( t_program program)
inline

Definition at line 39 of file t_oop_generator.h.

Member Function Documentation

virtual std::string t_oop_generator::autogen_comment ( )
inlinevirtual

Generates a comment about this code being autogenerated, using C++ style comments, which are also fair game in Java / PHP, yay!

Returns
C-style comment mentioning that this file is autogenerated.

Definition at line 67 of file t_oop_generator.h.

void t_oop_generator::scope_down ( std::ostream &  out)
inline

Definition at line 51 of file t_oop_generator.h.

Here is the call graph for this function:

void t_oop_generator::scope_up ( std::ostream &  out)
inline

Scoping, using curly braces!

Definition at line 46 of file t_oop_generator.h.

Here is the call graph for this function:

std::string t_oop_generator::upcase_string ( std::string  original)
inline

Definition at line 56 of file t_oop_generator.h.


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