pygccxml.declarations.enumeration module¶
defines class, that describes C++ enum
- class enumeration_t(name='', values=None)¶
Bases:
declaration_t
,byte_info
,elaborated_info
describes C++ enum
- append_value(valuename, valuenum=None)¶
Append another enumeration value to the enum.
The numeric value may be None in which case it is automatically determined by increasing the value of the last item.
When the ‘values’ attribute is accessed the resulting list will be in the same order as append_value() was called.
- Parameters:
valuename (str) – The name of the value.
valuenum (int) – The numeric value or None.
- get_name2value_dict()¶
returns a dictionary, that maps between enum name( key ) and enum value( value )
- has_value_name(name)¶
Check if this enum has a particular name among its values.
- Parameters:
name (str) – Enumeration value name
- Return type:
True if there is an enumeration value with the given name
- i_depend_on_them(recursive=True)¶
Return list of all types and declarations the declaration depends on
- property values¶
A list of tuples (valname(str), valnum(int)) that contain the enumeration values. @type: list