g4tools  5.4.0
Public Types | Public Member Functions | Protected Attributes | List of all members
tools::sg::field_desc Class Reference
Inheritance diagram for tools::sg::field_desc:
Inheritance graph
[legend]

Public Types

typedef ptrdiff_t offset_t
 
typedef std::pair< std::string, int > enum_t
 

Public Member Functions

 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
 

Protected Attributes

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 21 of file field_desc.

Member Typedef Documentation

◆ enum_t

typedef std::pair<std::string,int> tools::sg::field_desc::enum_t

Definition at line 76 of file field_desc.

◆ offset_t

Definition at line 27 of file field_desc.

Constructor & Destructor Documentation

◆ field_desc() [1/3]

tools::sg::field_desc::field_desc ( )
inline

Definition at line 29 of file field_desc.

29  :m_offset(0){ //touchy
30 //#ifdef TOOLS_MEM
31 // mem::increment(s_class().c_str());
32 //#endif
33  }

◆ field_desc() [2/3]

tools::sg::field_desc::field_desc ( const std::string &  a_name,
const std::string &  a_class,
offset_t  a_offset,
bool  a_editable 
)
inline

Definition at line 34 of file field_desc.

38  :m_name(a_name)
39  ,m_class(a_class)
40  ,m_offset(a_offset)
41  ,m_editable(a_editable)
42  {
43 //#ifdef TOOLS_MEM
44 // mem::increment(s_class().c_str());
45 //#endif
46  }

◆ ~field_desc()

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

Definition at line 47 of file field_desc.

47  {
48 //#ifdef TOOLS_MEM
49 // mem::decrement(s_class().c_str());
50 //#endif
51  }

◆ field_desc() [3/3]

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

Definition at line 53 of file field_desc.

54  :m_name(a_from.m_name)
55  ,m_class(a_from.m_class)
56  ,m_offset(a_from.m_offset)
57  ,m_editable(a_from.m_editable)
58  ,m_enums(a_from.m_enums)
59  ,m_opts(a_from.m_opts)
60  {}

Member Function Documentation

◆ add_enum()

void tools::sg::field_desc::add_enum ( const std::string &  a_key,
int  a_value 
)
inline

Definition at line 75 of file field_desc.

75 {m_enums.push_back(enum_t(a_key,a_value));}

◆ add_opt()

void tools::sg::field_desc::add_opt ( const std::string &  a_value)
inline

Definition at line 79 of file field_desc.

79 {m_opts.push_back(a_value);}

◆ cls()

const std::string& tools::sg::field_desc::cls ( ) const
inline

Definition at line 72 of file field_desc.

72 {return m_class;}

◆ editable()

bool tools::sg::field_desc::editable ( ) const
inline

Definition at line 82 of file field_desc.

82 {return m_editable;}

◆ enums()

const std::vector<enum_t>& tools::sg::field_desc::enums ( ) const
inline

Definition at line 77 of file field_desc.

77 {return m_enums;}

◆ name()

const std::string& tools::sg::field_desc::name ( ) const
inline

Definition at line 71 of file field_desc.

71 {return m_name;}

◆ offset()

offset_t tools::sg::field_desc::offset ( ) const
inline

Definition at line 73 of file field_desc.

73 {return m_offset;}

◆ operator=()

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

Definition at line 61 of file field_desc.

61  {
62  m_name = a_from.m_name;
63  m_class = a_from.m_class;
64  m_offset = a_from.m_offset;
65  m_editable = a_from.m_editable;
66  m_enums = a_from.m_enums;
67  m_opts = a_from.m_opts;
68  return *this;
69  }

◆ opts()

const std::vector<std::string>& tools::sg::field_desc::opts ( ) const
inline

Definition at line 80 of file field_desc.

80 {return m_opts;}

Member Data Documentation

◆ m_class

std::string tools::sg::field_desc::m_class
protected

Definition at line 85 of file field_desc.

◆ m_editable

bool tools::sg::field_desc::m_editable
protected

Definition at line 87 of file field_desc.

◆ m_enums

std::vector<enum_t> tools::sg::field_desc::m_enums
protected

Definition at line 88 of file field_desc.

◆ m_name

std::string tools::sg::field_desc::m_name
protected

Definition at line 84 of file field_desc.

◆ m_offset

offset_t tools::sg::field_desc::m_offset
protected

Definition at line 86 of file field_desc.

◆ m_opts

std::vector<std::string> tools::sg::field_desc::m_opts
protected

Definition at line 89 of file field_desc.


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::m_offset
offset_t m_offset
Definition: field_desc:86
tools::sg::field_desc::m_name
std::string m_name
Definition: field_desc:84
tools::sg::field_desc::m_opts
std::vector< std::string > m_opts
Definition: field_desc:89
tools::sg::field_desc::m_enums
std::vector< enum_t > m_enums
Definition: field_desc:88
tools::sg::field_desc::m_class
std::string m_class
Definition: field_desc:85
tools::sg::field_desc::m_editable
bool m_editable
Definition: field_desc:87