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

#include <t_enum.h>

Inheritance diagram for t_enum:
Collaboration diagram for t_enum:

Public Member Functions

 t_enum (t_program *program)
 
void set_name (const std::string &name)
 
void append (t_enum_value *constant)
 
const std::vector
< t_enum_value * > & 
get_constants ()
 
t_enum_valueget_constant_by_name (const std::string name)
 
t_enum_valueget_constant_by_value (int64_t value)
 
bool is_enum () const
 
virtual std::string get_fingerprint_material () const
 
void resolve_values ()
 
- Public Member Functions inherited from t_type
virtual ~t_type ()
 
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_typedef () 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 ()
 
virtual void generate_fingerprint ()
 
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

std::vector< t_enum_value * > constants_
 

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

An enumerated type. A list of constant objects with a name for the type.

Definition at line 30 of file t_enum.h.

Constructor & Destructor Documentation

t_enum::t_enum ( t_program program)
inline

Definition at line 32 of file t_enum.h.

Member Function Documentation

void t_enum::append ( t_enum_value constant)
inline

Definition at line 39 of file t_enum.h.

t_enum_value* t_enum::get_constant_by_name ( const std::string  name)
inline

Definition at line 47 of file t_enum.h.

Here is the call graph for this function:

t_enum_value* t_enum::get_constant_by_value ( int64_t  value)
inline

Definition at line 58 of file t_enum.h.

Here is the call graph for this function:

const std::vector<t_enum_value*>& t_enum::get_constants ( )
inline

Definition at line 43 of file t_enum.h.

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

Implements t_type.

Definition at line 73 of file t_enum.h.

bool t_enum::is_enum ( ) const
inlinevirtual

Reimplemented from t_type.

Definition at line 69 of file t_enum.h.

void t_enum::resolve_values ( )
inline

Definition at line 77 of file t_enum.h.

Here is the call graph for this function:

void t_enum::set_name ( const std::string &  name)
inlinevirtual

Reimplemented from t_type.

Definition at line 35 of file t_enum.h.

Member Data Documentation

std::vector<t_enum_value*> t_enum::constants_
private

Definition at line 91 of file t_enum.h.


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