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

#include <t_struct.h>

Inheritance diagram for t_struct:
Collaboration diagram for t_struct:

Public Member Functions

 t_struct (t_program *program)
 
 t_struct (t_program *program, const std::string &name)
 
virtual std::string get_struct_type_name ()
 
void set_xception (bool is_xception)
 
void set_union (bool is_union)
 
void set_xsd_all (bool xsd_all)
 
bool get_xsd_all () const
 
bool is_struct () const
 
bool is_xception () const
 
bool is_union () const
 
t_fieldget_field_by_name (std::string field_name)
 
- Public Member Functions inherited from t_struct_common
virtual ~t_struct_common ()
 
const members_typeget_members ()
 
const members_typeget_sorted_members ()
 
bool append (t_field *elem)
 
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_typedef () const
 
virtual bool is_enum () 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

bool is_xception_
 
bool is_union_
 
bool xsd_all_
 

Additional Inherited Members

- Public Types inherited from t_struct_common
typedef std::vector< t_field * > members_type
 
- 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_struct_common
 t_struct_common (t_program *program)
 
 t_struct_common (t_program *program, const std::string &name)
 
- 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_struct_common
members_type members_
 
members_type members_in_id_order_
 
- Protected Attributes inherited from t_type
t_programprogram_
 
std::string name_
 
uint8_t fingerprint_ [fingerprint_len]
 

Detailed Description

A struct is a container for a set of member fields that has a name. Structs are also used to implement exception types.

Definition at line 37 of file t_struct.h.

Constructor & Destructor Documentation

t_struct::t_struct ( t_program program)
inline

Definition at line 39 of file t_struct.h.

t_struct::t_struct ( t_program program,
const std::string &  name 
)
inline

Definition at line 44 of file t_struct.h.

Member Function Documentation

t_field* t_struct::get_field_by_name ( std::string  field_name)
inline

Definition at line 81 of file t_struct.h.

virtual std::string t_struct::get_struct_type_name ( )
inlinevirtual

Implements t_struct_common.

Definition at line 49 of file t_struct.h.

bool t_struct::get_xsd_all ( ) const
inline

Definition at line 65 of file t_struct.h.

bool t_struct::is_struct ( ) const
inlinevirtual

Reimplemented from t_type.

Definition at line 69 of file t_struct.h.

bool t_struct::is_union ( ) const
inline

Definition at line 77 of file t_struct.h.

bool t_struct::is_xception ( ) const
inlinevirtual

Reimplemented from t_type.

Definition at line 73 of file t_struct.h.

void t_struct::set_union ( bool  is_union)
inline

Definition at line 57 of file t_struct.h.

Here is the call graph for this function:

void t_struct::set_xception ( bool  is_xception)
inline

Definition at line 53 of file t_struct.h.

Here is the call graph for this function:

void t_struct::set_xsd_all ( bool  xsd_all)
inline

Definition at line 61 of file t_struct.h.

Member Data Documentation

bool t_struct::is_union_
private

Definition at line 97 of file t_struct.h.

bool t_struct::is_xception_
private

Definition at line 96 of file t_struct.h.

bool t_struct::xsd_all_
private

Definition at line 98 of file t_struct.h.


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