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

Public Member Functions

 t_cpp_generator (t_program *program, const std::map< std::string, std::string > &parsed_options, const std::string &option_string)
 
void init_generator ()
 
void close_generator ()
 
void generate_consts (std::vector< t_const * > consts)
 
void generate_typedef (t_typedef *ttypedef)
 
void generate_enum (t_enum *tenum)
 
void generate_struct (t_struct *tstruct)
 
void generate_xception (t_struct *txception)
 
void generate_cpp_struct (t_struct *tstruct, bool is_exception)
 
void generate_service (t_service *tservice)
 
void print_const_value (std::ofstream &out, std::string name, t_type *type, t_const_value *value)
 
std::string render_const_value (std::ofstream &out, std::string name, t_type *type, t_const_value *value)
 
void generate_struct_definition (std::ofstream &out, t_struct *tstruct, bool is_exception=false, bool pointers=false, bool read=true, bool write=true)
 
void generate_struct_fingerprint (std::ofstream &out, t_struct *tstruct, bool is_definition)
 
void generate_struct_reader (std::ofstream &out, t_struct *tstruct, bool pointers=false)
 
void generate_struct_writer (std::ofstream &out, t_struct *tstruct, bool pointers=false)
 
void generate_struct_result_writer (std::ofstream &out, t_struct *tstruct, bool pointers=false)
 
void generate_service_interface (t_service *tservice, string style)
 
void generate_service_interface_factory (t_service *tservice, string style)
 
void generate_service_null (t_service *tservice, string style)
 
void generate_service_multiface (t_service *tservice)
 
void generate_service_helpers (t_service *tservice)
 
void generate_service_client (t_service *tservice, string style)
 
void generate_service_processor (t_service *tservice, string style)
 
void generate_service_skeleton (t_service *tservice)
 
void generate_process_function (t_service *tservice, t_function *tfunction, string style, bool specialized=false)
 
void generate_function_helpers (t_service *tservice, t_function *tfunction)
 
void generate_service_async_skeleton (t_service *tservice)
 
void generate_deserialize_field (std::ofstream &out, t_field *tfield, std::string prefix="", std::string suffix="")
 
void generate_deserialize_struct (std::ofstream &out, t_struct *tstruct, std::string prefix="")
 
void generate_deserialize_container (std::ofstream &out, t_type *ttype, std::string prefix="")
 
void generate_deserialize_set_element (std::ofstream &out, t_set *tset, std::string prefix="")
 
void generate_deserialize_map_element (std::ofstream &out, t_map *tmap, std::string prefix="")
 
void generate_deserialize_list_element (std::ofstream &out, t_list *tlist, std::string prefix, bool push_back, std::string index)
 
void generate_serialize_field (std::ofstream &out, t_field *tfield, std::string prefix="", std::string suffix="")
 
void generate_serialize_struct (std::ofstream &out, t_struct *tstruct, std::string prefix="")
 
void generate_serialize_container (std::ofstream &out, t_type *ttype, std::string prefix="")
 
void generate_serialize_map_element (std::ofstream &out, t_map *tmap, std::string iter)
 
void generate_serialize_set_element (std::ofstream &out, t_set *tmap, std::string iter)
 
void generate_serialize_list_element (std::ofstream &out, t_list *tlist, std::string iter)
 
void generate_function_call (ostream &out, t_function *tfunction, string target, string iface, string arg_prefix)
 
std::string namespace_prefix (std::string ns)
 
std::string namespace_open (std::string ns)
 
std::string namespace_close (std::string ns)
 
std::string type_name (t_type *ttype, bool in_typedef=false, bool arg=false)
 
std::string base_type_name (t_base_type::t_base tbase)
 
std::string declare_field (t_field *tfield, bool init=false, bool pointer=false, bool constant=false, bool reference=false)
 
std::string function_signature (t_function *tfunction, std::string style, std::string prefix="", bool name_params=true)
 
std::string cob_function_signature (t_function *tfunction, std::string prefix="", bool name_params=true)
 
std::string argument_list (t_struct *tstruct, bool name_params=true, bool start_comma=false)
 
std::string type_to_enum (t_type *ttype)
 
std::string local_reflection_name (const char *, t_type *ttype, bool external=false)
 
void generate_enum_constant_list (std::ofstream &f, const vector< t_enum_value * > &constants, const char *prefix, const char *suffix, bool include_values)
 
void generate_local_reflection (std::ofstream &out, t_type *ttype, bool is_definition)
 
void generate_local_reflection_pointer (std::ofstream &out, t_type *ttype)
 
bool is_complex_type (t_type *ttype)
 
void set_use_include_prefix (bool use_include_prefix)
 
- Public Member Functions inherited from t_oop_generator
 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)
 

Private Member Functions

std::string get_include_prefix (const t_program &program) const
 
void generate_common_struct_reader_body (std::ofstream &out, t_struct_common *tstruct, bool pointers=false)
 
void generate_common_struct_writer_body (std::ofstream &out, t_struct_common *tstruct, bool pointers=false)
 

Private Attributes

bool gen_pure_enums_
 
bool gen_dense_
 
bool gen_templates_
 
bool use_include_prefix_
 
bool gen_cob_style_
 
bool gen_no_client_completion_
 
std::string ns_open_
 
std::string ns_close_
 
std::ofstream f_types_
 
std::ofstream f_types_impl_
 
std::ofstream f_types_tcc_
 
std::ofstream f_header_
 
std::ofstream f_service_
 
std::ofstream f_service_tcc_
 
std::set< std::string > reflected_fingerprints_
 

Friends

class ProcessorGenerator
 

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 generate_const (t_const *tconst)
 
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

C++ code generator. This is legitimacy incarnate.

Definition at line 47 of file t_cpp_generator.cc.

Constructor & Destructor Documentation

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

Definition at line 49 of file t_cpp_generator.cc.

Member Function Documentation

string t_cpp_generator::argument_list ( t_struct tstruct,
bool  name_params = true,
bool  start_comma = false 
)

Renders a field list

Parameters
tstructThe struct definition
Returns
Comma sepearated list of all field names in that struct

Definition at line 8241 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::base_type_name ( t_base_type::t_base  tbase)

Returns the C++ type that corresponds to the thrift type.

Parameters
tbaseThe base type
Returns
Explicit C++ type, i.e. "int32_t"

Definition at line 8027 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::close_generator ( )
virtual

Closes the output files.

Reimplemented from t_generator.

Definition at line 658 of file t_cpp_generator.cc.

std::string t_cpp_generator::cob_function_signature ( t_function tfunction,
std::string  prefix = "",
bool  name_params = true 
)
string t_cpp_generator::declare_field ( t_field tfield,
bool  init = false,
bool  pointer = false,
bool  constant = false,
bool  reference = false 
)

Declares a field, which may include initialization as necessary.

Parameters
ttypeThe type
Returns
Field declaration, i.e. int x = 0;

Definition at line 8080 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::function_signature ( t_function tfunction,
std::string  style,
std::string  prefix = "",
bool  name_params = true 
)

Renders a function signature of the form 'type name(args)'

Parameters
tfunctionFunction definition
Returns
String of rendered function definition

Definition at line 8159 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_common_struct_reader_body ( std::ofstream &  out,
t_struct_common tstruct,
bool  pointers = false 
)
private

Makes a helper function to gen a generic body of sandesh and struct readers.

Definition at line 8397 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_common_struct_writer_body ( std::ofstream &  out,
t_struct_common tstruct,
bool  pointers = false 
)
private

Makes a helper function to gen a generic body of sandesh and struct writers.

Definition at line 8561 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_consts ( std::vector< t_const * >  consts)
virtual

Generates a class that holds all the constants.

Reimplemented from t_generator.

Definition at line 801 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_cpp_struct ( t_struct tstruct,
bool  is_exception 
)

Generates a struct definition for a thrift data type. This is a class with data members and a read/write() function, plus a mirroring isset inner class.

Parameters
tstructThe struct definition

Definition at line 1035 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_container ( std::ofstream &  out,
t_type ttype,
std::string  prefix = "" 
)

Definition at line 7287 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_field ( std::ofstream &  out,
t_field tfield,
std::string  prefix = "",
std::string  suffix = "" 
)

Serialization constructs

Deserializes a field of any type.

Definition at line 7166 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_list_element ( std::ofstream &  out,
t_list tlist,
std::string  prefix,
bool  push_back,
std::string  index 
)

Definition at line 7504 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_map_element ( std::ofstream &  out,
t_map tmap,
std::string  prefix = "" 
)

Generates code to deserialize a map

Definition at line 7432 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_set_element ( std::ofstream &  out,
t_set tset,
std::string  prefix = "" 
)

Definition at line 7489 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_deserialize_struct ( std::ofstream &  out,
t_struct tstruct,
std::string  prefix = "" 
)

Generates an unserializer for a variable. This makes two key assumptions, first that there is a const char* variable named data that points to the buffer for deserialization, and that there is a variable protocol which is a reference to a TProtocol serialization object.

Definition at line 7275 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_enum ( t_enum tenum)
virtual

Generates code for an enumerated type. In C++, this is essentially the same as the thrift definition itself, using the enum keyword in C++.

Parameters
tenumThe enumeration

Generate a character array of enum names for debugging purposes.

Implements t_generator.

Definition at line 745 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_enum_constant_list ( std::ofstream &  f,
const vector< t_enum_value * > &  constants,
const char *  prefix,
const char *  suffix,
bool  include_values 
)

Definition at line 711 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_function_call ( ostream &  out,
t_function tfunction,
string  target,
string  iface,
string  arg_prefix 
)

Definition at line 5340 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_function_helpers ( t_service tservice,
t_function tfunction 
)

Generates a struct and helpers for a function.

Parameters
tfunctionThe function

Definition at line 6492 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_local_reflection ( std::ofstream &  out,
t_type ttype,
bool  is_definition 
)

Writes the local reflection of a type (either declaration or definition).

Definition at line 3262 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_local_reflection_pointer ( std::ofstream &  out,
t_type ttype 
)

Writes the structure's static pointer to its local reflection typespec into the implementation file.

Definition at line 3379 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_process_function ( t_service tservice,
t_function tfunction,
string  style,
bool  specialized = false 
)

Generates a process function definition.

Parameters
tfunctionThe function to write a dispatcher for

Definition at line 6531 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_container ( std::ofstream &  out,
t_type ttype,
std::string  prefix = "" 
)

Definition at line 7675 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_field ( std::ofstream &  out,
t_field tfield,
std::string  prefix = "",
std::string  suffix = "" 
)

Serializes a field of any type.

Parameters
tfieldThe field to serialize
prefixName to prepend to field name

Definition at line 7528 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_list_element ( std::ofstream &  out,
t_list tlist,
std::string  iter 
)

Serializes the members of a list.

Definition at line 7852 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_map_element ( std::ofstream &  out,
t_map tmap,
std::string  iter 
)

Serializes the members of a map.

Definition at line 7792 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_set_element ( std::ofstream &  out,
t_set tmap,
std::string  iter 
)

Serializes the members of a set.

Definition at line 7842 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_serialize_struct ( std::ofstream &  out,
t_struct tstruct,
std::string  prefix = "" 
)

Serializes all the members of a struct.

Parameters
tstructThe struct to serialize
prefixString prefix to attach to all fields

Definition at line 7663 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service ( t_service tservice)
virtual

Generates a thrift service. In C++, this comprises an entirely separate header and source file. The header file defines the methods and includes the data types defined in the main header file, and the implementation file contains implementations of the basic printer and default interfaces.

Parameters
tserviceThe service definition

Implements t_generator.

Definition at line 4965 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_async_skeleton ( t_service tservice)

Definition at line 5367 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_client ( t_service tservice,
string  style 
)

Generates a service client definition.

Parameters
tserviceThe service to generate a server for.

Definition at line 5574 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_helpers ( t_service tservice)

Generates helper functions for a service. Basically, this generates types for all the arguments and results to functions.

Parameters
tserviceThe service to generate a header definition for

Definition at line 5108 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_interface ( t_service tservice,
string  style 
)

Service-level generation functions

Generates a service interface definition.

Parameters
tserviceThe service to generate a header definition for

Definition at line 5136 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_interface_factory ( t_service tservice,
string  style 
)

Generates a service interface factory.

Parameters
tserviceThe service to generate an interface factory for.

Definition at line 5199 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_multiface ( t_service tservice)

Generates a multiface, which is a single server that just takes a set of objects implementing the interface and calls them all, returning the value of the last one to be called.

Parameters
tserviceThe service to generate a multiserver for.

Definition at line 5451 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_null ( t_service tservice,
string  style 
)

Generates a null implementation of the service.

Parameters
tserviceThe service to generate a header definition for

Definition at line 5288 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_processor ( t_service tservice,
string  style 
)

Generates a service processor definition.

Parameters
tserviceThe service to generate a processor for.

Definition at line 6481 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_service_skeleton ( t_service tservice)

Generates a skeleton file of a server

Parameters
tserviceThe service to generate a server for.

Definition at line 7080 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_struct ( t_struct tstruct)
inlinevirtual

Implements t_generator.

Definition at line 94 of file t_cpp_generator.cc.

void t_cpp_generator::generate_struct_definition ( std::ofstream &  out,
t_struct tstruct,
bool  is_exception = false,
bool  pointers = false,
bool  read = true,
bool  write = true 
)

Writes the struct definition into the header file

Parameters
outOutput stream
tstructThe struct

Definition at line 2647 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_struct_fingerprint ( std::ofstream &  out,
t_struct tstruct,
bool  is_definition 
)

Writes the fingerprint of a struct to either the header or implementation.

Parameters
outOutput stream
tstructThe struct

Definition at line 3229 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_struct_reader ( std::ofstream &  out,
t_struct tstruct,
bool  pointers = false 
)

Makes a helper function to gen a struct reader.

Parameters
outStream to write to
tstructThe struct

Definition at line 3397 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_struct_result_writer ( std::ofstream &  out,
t_struct tstruct,
bool  pointers = false 
)

Struct writer for result of a function, which can have only one of its fields set and does a conditional if else look up into the __isset field of the struct.

Parameters
outOutput stream
tstructThe result struct

Definition at line 4882 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_struct_writer ( std::ofstream &  out,
t_struct tstruct,
bool  pointers = false 
)

Generates the write function.

Parameters
outStream to write to
tstructThe struct

Definition at line 3423 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_typedef ( t_typedef ttypedef)
virtual

Program-level generation functions

Generates a typedef. This is just a simple 1-liner in C++

Parameters
ttypedefThe type definition

Implements t_generator.

Definition at line 704 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::generate_xception ( t_struct txception)
inlinevirtual

Reimplemented from t_generator.

Definition at line 97 of file t_cpp_generator.cc.

string t_cpp_generator::get_include_prefix ( const t_program program) const
private

Returns the include prefix to use for a file generated by program, or the empty string if no include prefix should be used.

Definition at line 8381 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::init_generator ( )
virtual

Init and close methods

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

Reimplemented from t_generator.

Definition at line 479 of file t_cpp_generator.cc.

bool t_cpp_generator::is_complex_type ( t_type ttype)
inline

Definition at line 353 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::local_reflection_name ( const char *  prefix,
t_type ttype,
bool  external = false 
)

Returns the symbol name of the local reflection of a type.

Definition at line 8341 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::namespace_close ( std::string  ns)

Closes namespace.

Parameters
nsThe namespace, w/ periods in it
Returns
Namespaces

Definition at line 7922 of file t_cpp_generator.cc.

string t_cpp_generator::namespace_open ( std::string  ns)

Opens namespace.

Parameters
nsThe namespace, w/ periods in it
Returns
Namespaces

Definition at line 7895 of file t_cpp_generator.cc.

string t_cpp_generator::namespace_prefix ( std::string  ns)

Makes a :: prefix for a namespace

Parameters
nsThe namespace, w/ periods in it
Returns
Namespaces

Definition at line 7865 of file t_cpp_generator.cc.

void t_cpp_generator::print_const_value ( std::ofstream &  out,
std::string  name,
t_type type,
t_const_value value 
)

Prints the value of a constant with the given type. Note that type checking is NOT performed in this function as it is always run beforehand using the validate_types method in main.cc

Definition at line 894 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::render_const_value ( std::ofstream &  out,
std::string  name,
t_type type,
t_const_value value 
)

Definition at line 960 of file t_cpp_generator.cc.

Here is the call graph for this function:

void t_cpp_generator::set_use_include_prefix ( bool  use_include_prefix)
inline

Definition at line 367 of file t_cpp_generator.cc.

string t_cpp_generator::type_name ( t_type ttype,
bool  in_typedef = false,
bool  arg = false 
)

Returns a C++ type name

Parameters
ttypeThe type
Returns
String of the type name, i.e. std::set<type>

Definition at line 7942 of file t_cpp_generator.cc.

Here is the call graph for this function:

string t_cpp_generator::type_to_enum ( t_type type)

Converts the parse type to a C++ enum string for the given type.

Parameters
typeThrift Type
Returns
String of C++ code to definition of that type constant

Definition at line 8265 of file t_cpp_generator.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class ProcessorGenerator
friend

Definition at line 472 of file t_cpp_generator.cc.

Member Data Documentation

std::ofstream t_cpp_generator::f_header_
private

Definition at line 440 of file t_cpp_generator.cc.

std::ofstream t_cpp_generator::f_service_
private

Definition at line 441 of file t_cpp_generator.cc.

std::ofstream t_cpp_generator::f_service_tcc_
private

Definition at line 442 of file t_cpp_generator.cc.

std::ofstream t_cpp_generator::f_types_
private

File streams, stored here to avoid passing them as parameters to every function.

Definition at line 437 of file t_cpp_generator.cc.

std::ofstream t_cpp_generator::f_types_impl_
private

Definition at line 438 of file t_cpp_generator.cc.

std::ofstream t_cpp_generator::f_types_tcc_
private

Definition at line 439 of file t_cpp_generator.cc.

bool t_cpp_generator::gen_cob_style_
private

True if we should generate "Continuation OBject"-style classes as well.

Definition at line 418 of file t_cpp_generator.cc.

bool t_cpp_generator::gen_dense_
private

True if we should generate local reflection metadata for TDenseProtocol.

Definition at line 402 of file t_cpp_generator.cc.

bool t_cpp_generator::gen_no_client_completion_
private

True if we should omit calls to completion__() in CobClient class.

Definition at line 423 of file t_cpp_generator.cc.

bool t_cpp_generator::gen_pure_enums_
private

True if we should generate pure enums for Thrift enums, instead of wrapper classes.

Definition at line 397 of file t_cpp_generator.cc.

bool t_cpp_generator::gen_templates_
private

True if we should generate templatized reader/writer methods.

Definition at line 407 of file t_cpp_generator.cc.

std::string t_cpp_generator::ns_close_
private

Definition at line 430 of file t_cpp_generator.cc.

std::string t_cpp_generator::ns_open_
private

Strings for namespace, computed once up front then used directly

Definition at line 429 of file t_cpp_generator.cc.

std::set<std::string> t_cpp_generator::reflected_fingerprints_
private

When generating local reflections, make sure we don't generate duplicates.

Definition at line 464 of file t_cpp_generator.cc.

bool t_cpp_generator::use_include_prefix_
private

True if we should use a path prefix in our #include statements for other thrift-generated header files.

Definition at line 413 of file t_cpp_generator.cc.


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