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

#include <t_typedef.h>

Inheritance diagram for t_typedef:
Collaboration diagram for t_typedef:

Public Member Functions

 t_typedef (t_program *program, t_type *type, std::string symbolic)
 
 ~t_typedef ()
 
t_typeget_type () const
 
const std::string & get_symbolic () const
 
bool is_typedef () const
 
virtual std::string get_fingerprint_material () const
 
virtual void generate_fingerprint ()
 
- Public Member Functions inherited from t_type
virtual ~t_type ()
 
virtual void set_name (const std::string &name)
 
virtual const std::string & get_name () const
 
virtual bool is_void () const
 
virtual bool is_base_type () const
 
virtual bool is_string () const
 
virtual bool is_bool () const
 
virtual bool is_enum () const
 
virtual bool is_struct () const
 
virtual bool is_xception () const
 
virtual bool is_container () const
 
virtual bool is_list () const
 
virtual bool is_set () const
 
virtual bool is_map () const
 
virtual bool is_service () const
 
t_programget_program ()
 
t_typeget_true_type ()
 
bool has_fingerprint () const
 
const uint8_t * get_binary_fingerprint () const
 
std::string get_ascii_fingerprint () const
 
const uint32_t get_4byte_fingerprint () const
 
- Public Member Functions inherited from t_doc
 t_doc ()
 
void set_doc (const std::string &doc)
 
const std::string & get_doc () const
 
bool has_doc ()
 

Private Attributes

t_typetype_
 
std::string symbolic_
 

Additional Inherited Members

- Static Public Member Functions inherited from t_type
static char nybble_to_xdigit (int num)
 
static std::string byte_to_hex (uint8_t byte)
 
- Public Attributes inherited from t_type
std::map< std::string,
std::string > 
annotations_
 
- Static Public Attributes inherited from t_type
static const int fingerprint_len = 16
 
- Protected Member Functions inherited from t_type
 t_type ()
 
 t_type (t_program *program)
 
 t_type (t_program *program, std::string name)
 
 t_type (std::string name)
 
- Protected Attributes inherited from t_type
t_programprogram_
 
std::string name_
 
uint8_t fingerprint_ [fingerprint_len]
 

Detailed Description

A typedef is a mapping from a symbolic name to another type. In dymanically typed languages (i.e. php/python) the code generator can actually usually ignore typedefs and just use the underlying type directly, though in C++ the symbolic naming can be quite useful for code clarity.

Definition at line 33 of file t_typedef.h.

Constructor & Destructor Documentation

t_typedef::t_typedef ( t_program program,
t_type type,
std::string  symbolic 
)
inline

Definition at line 35 of file t_typedef.h.

t_typedef::~t_typedef ( )
inline

Definition at line 40 of file t_typedef.h.

Member Function Documentation

virtual void t_typedef::generate_fingerprint ( )
inlinevirtual

Reimplemented from t_type.

Definition at line 58 of file t_typedef.h.

Here is the call graph for this function:

virtual std::string t_typedef::get_fingerprint_material ( ) const
inlinevirtual

Implements t_type.

Definition at line 54 of file t_typedef.h.

Here is the call graph for this function:

const std::string& t_typedef::get_symbolic ( ) const
inline

Definition at line 46 of file t_typedef.h.

t_type* t_typedef::get_type ( ) const
inline

Definition at line 42 of file t_typedef.h.

bool t_typedef::is_typedef ( ) const
inlinevirtual

Reimplemented from t_type.

Definition at line 50 of file t_typedef.h.

Member Data Documentation

std::string t_typedef::symbolic_
private

Definition at line 67 of file t_typedef.h.

t_type* t_typedef::type_
private

Definition at line 66 of file t_typedef.h.


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