|
| | structure (const std::string &strName, uint32_t ui32StructVersion=1) |
| |
| size_t | GetSize () const |
| |
| size_t | GetAlignment () const |
| |
| template<typename MemberType> |
| structure & | Add (const std::string &strName, MemberType T::*pMemberOffset) |
| |
| template<typename MemberType> |
| structure & | Add (const std::string &strName, MemberType T::*pMemberOffset, const ddl::DDEnum &oTypeDefinition) |
| |
| template<typename MemberType> |
| structure & | Add (const std::string &strName, MemberType T::*pMemberOffset, const ddl::DDStructure &oTypeDefinition) |
| |
| const ddl::DDStructure & | GetStructure () const |
| | Get the current valid DDStructure object.
|
| |
| | operator const ddl::DDStructure & () const |
| | Get the current valid DDStructure object.
|
| |
| | DDStructureGenerator (const std::string &name, uint32_t struct_version=1) |
| | CTOR to create a structure type based on a type.
|
| |
| DDElementRef | createElement (const std::string &name, MemberType void::*member_offset) |
| |
| DDElementRef | createElement (const std::string &name, MemberType void::*member_offset, const std::string &valid_element_count_or_array_size_name) |
| |
| DDElementRef | createElement (const std::string &name, MemberType void::*member_offset, const DDEnum &enum_type) |
| |
| DDElement | createElement (const std::string &name, MemberType void::*member_offset, const DDEnum &enum_type, const std::string &valid_element_count_or_array_size_name) |
| |
| DDElementRef | createElement (const std::string &name, MemberType void::*member_offset, const DDStructure &struct_type) |
| |
| DDElementRef | createElement (const std::string &name, MemberType void::*member_offset, const DDStructure &struct_type, const std::string &valid_element_count_or_array_size_name) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset, const std::string &valid_element_count_or_array_size_name) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset, const DDEnum &enum_type) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset, const DDEnum &enum_type, const std::string &valid_element_count_or_array_size_name) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset, const DDStructure &struct_type) |
| |
| DDStructureGenerator & | addElement (const std::string &name, MemberType void::*member_offset, const DDStructure &struct_type, const std::string &valid_element_count_or_array_size_name) |
| |
| std::string | getStructDescription () const |
| | Gets the structs data definition as XML String.
|
| |
| std::string | getStructName () const |
| | Gets the Struct Name.
|
| |
| const dd::DataDefinition & | getDD () const |
| | returns a valid DDL.
|
| |
| const dd::StructType & | getStructType () const |
| | Get the Struct Type object.
|
| |
| const DDStructure & | getStructure () const |
| | Get the current valid DDStructure object.
|
| |
| size_t | getSize () const |
| | Retrieves the current evaluated size of the structure.
|
| |
| size_t | getAlignment () const |
| | Retrieves the current evaluated alignment of the structure.
|
| |
| | operator const DDStructure & () const |
| | Get the current valid DDStructure object.
|
| |
| void | setStructInfo (const std::string &comment) |
| | Set additional struct information like comment. This is important to create additional info in type reflection for DDStructureGenerator.
|
| |
| 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={}) |
| | Set additional element information to the given element_name.
|
| |
| void | setElementUnit (const std::string &element_name, const DDUnit &unit) |
| | Sets additional element unit information to the given element_name. Any other unit information will be overwritten.
|
| |
| void | setElementUnit (const std::string &element_name, const dd::BaseUnit &base_unit) |
| | Sets additional element base unit information to the given element_name.
|
| |
| DDElementRef | getElement (const std::string &element_name) |
| | Gets a element reference to the element with name element_name owned by the DDStructureGenerator.
|
| |
template<typename T = void>
class adtf::mediadescription::osborn::structure< T >
This is used to create a structure type from an existing c++ struct definition.
Example Usage
struct tSub
{
uint8_t nValue1;
uint8_t nValue2;
};
struct tParent
{
uint32_t nSomething;
tSub sSub;
};
.Add("nValue1", &tSub::nValue1)
.Add("nValue2", &tSub::nValue2);
.Add("nSomething", &tParent::nSomething)
.Add("sSub", &tParent::sSub, oSubType);
Also have a look at Example Demo Time Trigger.