Utility class for a complete valid data definition of one EnumType and its dependencies. This class is for convenience to use it together with ddl::DDStructure .
More...
#include <ddenum.h>
Inherited by ddl::DDEnumGenerator< EnumDataType, typename std::enable_if< std::is_arithmetic< EnumDataType >::value >::type >, ddl::DDEnumGenerator< EnumDataType, Enable >, and ddl::DDEnumGenerator< EnumDataType, typename std::enable_if< std::is_arithmetic< EnumDataType >::value >::type >.
Utility class for a complete valid data definition of one EnumType and its dependencies. This class is for convenience to use it together with ddl::DDStructure .
- See also
- ddl::DDStructure.
◆ DDEnum() [1/3]
| ddl::DDEnum::DDEnum |
( |
const DDEnum & | other | ) |
|
Construct a new DDEnum object.
- Parameters
-
| other | the enum type definition to copy |
◆ DDEnum() [2/3]
Construct a new DDEnum object.
- Parameters
-
| name | name of the enum type. |
| data_type | base data type to use (see templates ddl::DataType). |
| elements | vector of element of the enum type. |
- Exceptions
-
◆ DDEnum() [3/3]
Construct a new DDEnum object.
- Parameters
-
| name | name of the enum type. |
| data_type | the data type to use (use this if you created a new datatype with units i.e. ) |
| elements | vector of element of the enum type. |
- Exceptions
-
◆ addElement() [1/2]
adds a EnumType element.
- Parameters
-
| element | the elment to add. |
- Exceptions
-
◆ addElement() [2/2]
| DDEnum & ddl::DDEnum::addElement |
( |
const std::string & | name, |
|
|
int64_t | value ) |
adds a EnumType element.
- Parameters
-
| name | the name of the element to add. |
| value | the name of the element (if it is an integer value). |
- Exceptions
-
◆ addElements()
adds a vector of EnumType elements.
- Parameters
-
| elements | the elments to add. |
- Exceptions
-
◆ getAlignment()
| size_t ddl::DDEnum::getAlignment |
( |
| ) |
const |
returns the alignment of the underlying datatype.
- Returns
- the alignment of the datatype
◆ getDD()
◆ getEnumType()
◆ getTypeByteSize()
| size_t ddl::DDEnum::getTypeByteSize |
( |
| ) |
const |
returns the size of the underlying datatype.
- Returns
- the size in bytes of the underlying datatype
◆ operator=() [1/2]
copies a DDEnum object
- Parameters
-
| other | the enum type definition to copy |
◆ operator=() [2/2]
The documentation for this class was generated from the following file: