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

#include <t_field.h>

Inheritance diagram for t_field:
Collaboration diagram for t_field:

Classes

struct  key_compare
 

Public Types

enum  e_req { T_REQUIRED, T_OPTIONAL, T_OPT_IN_REQ_OUT }
 

Public Member Functions

 t_field (t_type *type, std::string name)
 
 t_field (t_type *type, std::string name, int32_t key)
 
virtual ~t_field ()
 
t_typeget_type () const
 
const std::string & get_name () const
 
int32_t get_key () const
 
void set_req (e_req req)
 
e_req get_req () const
 
void set_value (t_const_value *value)
 
t_const_valueget_value ()
 
void set_xsd_optional (bool xsd_optional)
 
bool get_xsd_optional () const
 
void set_xsd_nillable (bool xsd_nillable)
 
bool get_xsd_nillable () const
 
void set_xsd_attrs (t_struct *xsd_attrs)
 
t_structget_xsd_attrs ()
 
std::string get_fingerprint_material () 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 ()
 

Public Attributes

std::map< std::string,
std::string > 
annotations_
 

Private Attributes

t_typetype_
 
std::string name_
 
int32_t key_
 
e_req req_
 
t_const_valuevalue_
 
bool xsd_optional_
 
bool xsd_nillable_
 
t_structxsd_attrs_
 

Detailed Description

Class to represent a field in a thrift structure. A field has a data type, a symbolic name, and a numeric identifier.

Definition at line 36 of file t_field.h.

Member Enumeration Documentation

Enumerator
T_REQUIRED 
T_OPTIONAL 
T_OPT_IN_REQ_OUT 

Definition at line 103 of file t_field.h.

Constructor & Destructor Documentation

t_field::t_field ( t_type type,
std::string  name 
)
inline

Definition at line 38 of file t_field.h.

t_field::t_field ( t_type type,
std::string  name,
int32_t  key 
)
inline

Definition at line 54 of file t_field.h.

virtual t_field::~t_field ( )
inlinevirtual

Definition at line 89 of file t_field.h.

Member Function Documentation

std::string t_field::get_fingerprint_material ( ) const
inline

Definition at line 161 of file t_field.h.

Here is the call graph for this function:

int32_t t_field::get_key ( ) const
inline

Definition at line 99 of file t_field.h.

const std::string& t_field::get_name ( ) const
inline

Definition at line 95 of file t_field.h.

e_req t_field::get_req ( ) const
inline

Definition at line 113 of file t_field.h.

t_type* t_field::get_type ( ) const
inline

Definition at line 91 of file t_field.h.

t_const_value* t_field::get_value ( )
inline

Definition at line 121 of file t_field.h.

t_struct* t_field::get_xsd_attrs ( )
inline

Definition at line 145 of file t_field.h.

bool t_field::get_xsd_nillable ( ) const
inline

Definition at line 137 of file t_field.h.

bool t_field::get_xsd_optional ( ) const
inline

Definition at line 129 of file t_field.h.

void t_field::set_req ( e_req  req)
inline

Definition at line 109 of file t_field.h.

void t_field::set_value ( t_const_value value)
inline

Definition at line 117 of file t_field.h.

void t_field::set_xsd_attrs ( t_struct xsd_attrs)
inline

Definition at line 141 of file t_field.h.

void t_field::set_xsd_nillable ( bool  xsd_nillable)
inline

Definition at line 133 of file t_field.h.

void t_field::set_xsd_optional ( bool  xsd_optional)
inline

Definition at line 125 of file t_field.h.

Member Data Documentation

std::map<std::string, std::string> t_field::annotations_

Definition at line 199 of file t_field.h.

int32_t t_field::key_
private

Definition at line 204 of file t_field.h.

std::string t_field::name_
private

Definition at line 203 of file t_field.h.

e_req t_field::req_
private

Definition at line 205 of file t_field.h.

t_type* t_field::type_
private

Definition at line 202 of file t_field.h.

t_const_value* t_field::value_
private

Definition at line 206 of file t_field.h.

t_struct* t_field::xsd_attrs_
private

Definition at line 210 of file t_field.h.

bool t_field::xsd_nillable_
private

Definition at line 209 of file t_field.h.

bool t_field::xsd_optional_
private

Definition at line 208 of file t_field.h.


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