g4tools  5.4.0
Public Member Functions | List of all members
tools::sg::field_desc_enums Class Reference
Inheritance diagram for tools::sg::field_desc_enums:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::field_desc_enums:
Collaboration graph
[legend]

Public Member Functions

 field_desc_enums (const std::string &a_name, const std::string &a_class, offset_t a_offset, bool a_editable, size_t a_num,...)
 
virtual ~field_desc_enums ()
 
 field_desc_enums (const field_desc_enums &a_from)
 
field_desc_enumsoperator= (const field_desc_enums &a_from)
 
- Public Member Functions inherited from tools::sg::field_desc
 field_desc ()
 
 field_desc (const std::string &a_name, const std::string &a_class, offset_t a_offset, bool a_editable)
 
virtual ~field_desc ()
 
 field_desc (const field_desc &a_from)
 
field_descoperator= (const field_desc &a_from)
 
const std::string & name () const
 
const std::string & cls () const
 
offset_t offset () const
 
void add_enum (const std::string &a_key, int a_value)
 
const std::vector< enum_t > & enums () const
 
void add_opt (const std::string &a_value)
 
const std::vector< std::string > & opts () const
 
bool editable () const
 

Additional Inherited Members

- Public Types inherited from tools::sg::field_desc
typedef ptrdiff_t offset_t
 
typedef std::pair< std::string, int > enum_t
 
- Protected Attributes inherited from tools::sg::field_desc
std::string m_name
 
std::string m_class
 
offset_t m_offset
 
bool m_editable
 
std::vector< enum_tm_enums
 
std::vector< std::string > m_opts
 

Detailed Description

Definition at line 99 of file field_desc.

Constructor & Destructor Documentation

◆ field_desc_enums() [1/2]

tools::sg::field_desc_enums::field_desc_enums ( const std::string &  a_name,
const std::string &  a_class,
offset_t  a_offset,
bool  a_editable,
size_t  a_num,
  ... 
)
inline

Definition at line 102 of file field_desc.

103  :parent(a_name,a_class,a_offset,a_editable)
104  {
105  va_list args;
106  va_start(args,a_num);
107  for(size_t index=0;index<a_num;index++) {
108  char* _key = va_arg(args,char*);
109  int _value = va_arg(args,int);
110  m_enums.push_back(enum_t(_key,_value));
111  }
112  va_end(args);
113  }

◆ ~field_desc_enums()

virtual tools::sg::field_desc_enums::~field_desc_enums ( )
inlinevirtual

Definition at line 114 of file field_desc.

114 {}

◆ field_desc_enums() [2/2]

tools::sg::field_desc_enums::field_desc_enums ( const field_desc_enums a_from)
inline

Definition at line 116 of file field_desc.

116 :parent(a_from) {}

Member Function Documentation

◆ operator=()

field_desc_enums& tools::sg::field_desc_enums::operator= ( const field_desc_enums a_from)
inline

Definition at line 117 of file field_desc.

117 {parent::operator=(a_from);return *this;}

The documentation for this class was generated from the following file:
tools::sg::field_desc::enum_t
std::pair< std::string, int > enum_t
Definition: field_desc:76
tools::sg::field_desc::operator=
field_desc & operator=(const field_desc &a_from)
Definition: field_desc:61
tools::sg::field_desc::m_enums
std::vector< enum_t > m_enums
Definition: field_desc:88