ADTF
|
This is used to create a structure type from an existing c++ struct definition. More...
Public Types | |
typedef ddl::DDStructureGenerator< T, true > | base_type |
Public Member Functions | |
structure (const std::string &strName, uint32_t ui32StructVersion=1) | |
Initializes the structure type. More... | |
size_t | GetSize () const |
Returns the current size of the structure. More... | |
size_t | GetAlignment () const |
Returns the alignment of the structure. More... | |
template<typename MemberType > | |
structure & | Add (const std::string &strName, MemberType T::*pMemberOffset) |
Adds a new member of arithmetic type (POD). More... | |
template<typename MemberType > | |
structure & | Add (const std::string &strName, MemberType T::*pMemberOffset, const ddl::DDEnum &oTypeDefinition) |
Adds a new member of an enumeration type. More... | |
template<typename MemberType > | |
structure & | Add (const std::string &strName, MemberType T::*pMemberOffset, const ddl::DDStructure &oTypeDefinition) |
Adds a new member of a structure type. More... | |
const ddl::DDStructure & | GetStructure () const |
Get the current valid DDStructure object. More... | |
operator const ddl::DDStructure & () const | |
Get the current valid DDStructure object. More... | |
Public Member Functions inherited from DDStructureGenerator< void, true > | |
DDStructureGenerator (const std::string &name, uint32_t struct_version=1) | |
CTOR to create a structure type based on a type. More... | |
DDElementRef | createElement (const std::string &name, MemberType T::*member_offset) |
Creates a new member of data type (POD) by member reference pointer. More... | |
DDElementRef | createElement (const std::string &name, MemberType T::*member_offset, const std::string &valid_element_count_or_array_size_name) |
Creates a new array member of data type (POD) by member reference pointer. More... | |
DDElementRef | createElement (const std::string &name, MemberType T::*member_offset, const DDEnum &enum_type) |
Adds a new member of an enumeration type by member reference pointer. More... | |
DDElement | createElement (const std::string &name, MemberType T::*member_offset, const DDEnum &enum_type, const std::string &valid_element_count_or_array_size_name) |
Adds a new array member of an enumeration type by member reference pointer. More... | |
DDElementRef | createElement (const std::string &name, MemberType T::*member_offset, const DDStructure &struct_type) |
Adds a new member of an structure type by member reference pointer. More... | |
DDElementRef | createElement (const std::string &name, MemberType T::*member_offset, const DDStructure &struct_type, const std::string &valid_element_count_or_array_size_name) |
Adds a new array member of an structure type by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset) |
Adds a new member of data type (POD) by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset, const std::string &valid_element_count_or_array_size_name) |
Adds a new member of data type (POD) by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset, const DDEnum &enum_type) |
Adds a new member of an enumeration type by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset, const DDEnum &enum_type, const std::string &valid_element_count_or_array_size_name) |
Adds a new array member of an enumeration type by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset, const DDStructure &struct_type) |
Adds a new member of an structure type by member reference pointer. More... | |
DDStructureGenerator & | addElement (const std::string &name, MemberType T::*member_offset, const DDStructure &struct_type, const std::string &valid_element_count_or_array_size_name) |
Adds a new member of an structure type by member reference pointer. More... | |
std::string | getStructDescription () const |
Gets the structs data definition as XML String. More... | |
std::string | getStructName () const |
Gets the Struct Name. More... | |
const dd::DataDefinition & | getDD () const |
returns a valid DDL. More... | |
const dd::StructType & | getStructType () const |
Get the Struct Type object. More... | |
const DDStructure & | getStructure () const |
Get the current valid DDStructure object. More... | |
size_t | getSize () const |
Retrieves the current evaluated size of the structure. More... | |
size_t | getAlignment () const |
Retrieves the current evaluated alignment of the structure. More... | |
operator const DDStructure & () const | |
Get the current valid DDStructure object. More... | |
void | setStructInfo (const std::string &comment) |
void | setElementInfo (const std::string &element_name, const std::string &description={}, const std::string &comment={}, const std::string &value={}, const std::string &minimum_value={}, const std::string &maximum_value={}, const std::string &default_value={}, const std::string &scale={}, const std::string &offset={}) |
void | setElementUnit (const std::string &element_name, const DDUnit &unit) |
Sets additional element unit information to the given element_name . More... | |
void | setElementUnit (const std::string &element_name, const dd::BaseUnit &base_unit) |
Sets additional element base unit information to the given element_name . More... | |
DDElementRef | getElement (const std::string &element_name) |
Gets a element reference to the element with name element_name owned by the DDStructureGenerator. More... | |
This is used to create a structure type from an existing c++ struct definition.
Also have a look at Demo Time Trigger Plugin.
Definition at line 124 of file type_reflection.h.
|
inline |
Initializes the structure type.
[in] | strName | The name. |
[in] | ui32StructVersion | The structure version. |
Definition at line 139 of file type_reflection.h.
|
inline |
Adds a new member of arithmetic type (POD).
[in] | strName | The name of the member. |
[in] | pMemberOffset | The pointer to the member. |
Definition at line 170 of file type_reflection.h.
References DDStructureGenerator< T, align_with_padding >::addElement().
Referenced by structure< void >::Add().
|
inline |
Adds a new member of an enumeration type.
[in] | strName | The name of the member. |
[in] | pMemberOffset | The pointer to the member. |
[in] | oTypeDefinition | The enumeration type. |
Definition at line 185 of file type_reflection.h.
References DDStructureGenerator< T, align_with_padding >::addElement().
|
inline |
Adds a new member of a structure type.
[in] | strName | The name of the member. |
[in] | pMemberOffset | The pointer to the member. |
[in] | oTypeDefinition | The structure type. |
Definition at line 199 of file type_reflection.h.
References DDStructureGenerator< T, align_with_padding >::addElement().
|
inline |
Returns the alignment of the structure.
Definition at line 158 of file type_reflection.h.
References StructType::getAlignment(), and DDStructureGenerator< T, align_with_padding >::getStructType().
|
inline |
Returns the current size of the structure.
Definition at line 149 of file type_reflection.h.
References DDStructureGenerator< T, align_with_padding >::getDD(), StructTypeAccess::getStaticStructSize(), DDStructureGenerator< T, align_with_padding >::getStructName(), and DataDefinition::getStructTypeAccess().
|
inline |
Get the current valid DDStructure object.
ddl::dd::Error | Throws if the evaluated size is not sizeof(T). Check if there may be missed elements. |
Definition at line 212 of file type_reflection.h.
References DDStructureGenerator< T, align_with_padding >::getStructure().
Referenced by structure< T >::operator const ddl::DDStructure &().
|
inline |
Get the current valid DDStructure object.
ddl::dd::Error | Throws if the evaluated size is not sizeof(T). Check if there may be missed elements. |
Definition at line 224 of file type_reflection.h.
References structure< T >::GetStructure().