ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::flash::structure< void > Class Reference

#include <type_reflection_legacy.h>

Inherits adtf::mediadescription::flash::cStructureType, and adtf::mediadescription::flash::cStructureType.

Public Member Functions

 structure (const std::string &strName, size_t nAlignment=0)
 
size_t GetSize () const override
 
size_t GetAlignment () const override
 
template<typename ArithmeticType>
std::enable_if< std::is_arithmetic< ArithmeticType >::value, structure >::type & Add (const std::string &strName, size_t nArrayCount=1, size_t nAlignment=0, int32_t nBytePosition=-1, bool bLittleEndian=true)
 
structureAdd (const std::string &strName, const cEnumerationType &oTypeDefinition, size_t nArrayCount=1, size_t nAlignment=0, int32_t nBytePosition=-1, bool bLittleEndian=true)
 
structureAdd (const std::string &strName, const cStructureType &oTypeDefinition, size_t nArrayCount=1, size_t nAlignment=0, int32_t nBytePosition=-1, bool bLittleEndian=true)
 
 structure (const std::string &strName)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cEnumerationType &oTypeDefinition)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cStructureType &oTypeDefinition)
 
 structure (const std::string &strName)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cEnumerationType &oTypeDefinition)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cStructureType &oTypeDefinition)
 
 structure (const std::string &strName)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cEnumerationType &oTypeDefinition)
 
structureAdd (const std::string &strName, MemberType void::*pMemberOffset, const cStructureType &oTypeDefinition)
 
- Public Member Functions inherited from adtf::mediadescription::flash::cStructureType
 cStructureType (const std::string &strName, size_t nSize, size_t nAlignment)
 
 cStructureType (const cStructureType &oOther)
 
std::string GetName () const override
 
const std::vector< member > & GetMembers () const
 
std::pair< std::string, std::string > GetAsStringPair () const
 
 operator std::pair< std::string, std::string > () const
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::mediadescription::flash::cStructureType
void Add (member &&sNewMember)
 

Detailed Description

This is used to create a structure type independently.

Example Usage

auto oSubType = structure<>("tSub")
.Add<uint8_t>("nValue1")
.Add<uint8_t>("nValue2");
auto oParentType = structure<tParent>("tParent")
.Add<uint32_t>("nSomething", &tParent::nSomething)
.Add("sSub", oSubType);
structure(const std::string &strName, size_t nAlignment=0)
std::enable_if< std::is_arithmetic< ArithmeticType >::value, structure >::type & Add(const std::string &strName, size_t nArrayCount=1, size_t nAlignment=0, int32_t nBytePosition=-1, bool bLittleEndian=true)
Definition type_reflection_legacy.h:509

Constructor & Destructor Documentation

◆ structure() [1/4]

adtf::mediadescription::flash::structure< void >::structure ( const std::string & strName,
size_t nAlignment = 0 )

Initializes the structure

Parameters
[in]strNameThe name
[in]nAlignmentThe alignment. 0 => Alignment will be calculated from the members.
Deprecated
Use ddl::dd::DDStructure instead.

◆ structure() [2/4]

adtf::mediadescription::flash::structure< void >::structure ( const std::string & strName)
inline

Initializes the structure type.

Parameters
[in]strNameThe name.

◆ structure() [3/4]

adtf::mediadescription::flash::structure< void >::structure ( const std::string & strName)
inline

Initializes the structure type.

Parameters
[in]strNameThe name.

◆ structure() [4/4]

adtf::mediadescription::flash::structure< void >::structure ( const std::string & strName)
inline

Initializes the structure type.

Parameters
[in]strNameThe name.

Member Function Documentation

◆ Add() [1/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
const cEnumerationType & oTypeDefinition,
size_t nArrayCount = 1,
size_t nAlignment = 0,
int32_t nBytePosition = -1,
bool bLittleEndian = true )

Adds a new member of an enumeration type.

Parameters
[in]strNameThe name of the member.
[in]oTypeDefinitionThe enumeration type definition.
[in]nArrayCountThe array size of the member.
[in]nAlignmentThe Alignment of the member. 0 => alignment is taken from the type.
[in]nBytePositionThe byte position in the serialized representation.
[in]bLittleEndianWhether the value in the serialized representation is little endian or not.
Returns
A reference to the structure.

◆ Add() [2/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
const cStructureType & oTypeDefinition,
size_t nArrayCount = 1,
size_t nAlignment = 0,
int32_t nBytePosition = -1,
bool bLittleEndian = true )

Adds a new member of a structure type.

Parameters
[in]strNameThe name of the member.
[in]oTypeDefinitionThe structure type definition.
[in]nArrayCountThe array size of the member.
[in]nAlignmentThe Alignment of the member. 0 => alignment is taken from the type.
[in]nBytePositionThe byte position in the serialized representation.
[in]bLittleEndianWhether the value in the serialized representation is little endian or not.
Returns
A reference to the structure.

◆ Add() [3/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset )
inline

Adds a new member of arithmetic type (POD).

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
Returns
A reference to the structure.

◆ Add() [4/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset )
inline

Adds a new member of arithmetic type (POD).

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
Returns
A reference to the structure.

◆ Add() [5/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset )
inline

Adds a new member of arithmetic type (POD).

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
Returns
A reference to the structure.

◆ Add() [6/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cEnumerationType & oTypeDefinition )
inline

Adds a new member of an enumeration type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe enumeration type.
Returns
A reference to the structure.

◆ Add() [7/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cEnumerationType & oTypeDefinition )
inline

Adds a new member of an enumeration type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe enumeration type.
Returns
A reference to the structure.

◆ Add() [8/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cEnumerationType & oTypeDefinition )
inline

Adds a new member of an enumeration type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe enumeration type.
Returns
A reference to the structure.

◆ Add() [9/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cStructureType & oTypeDefinition )
inline

Adds a new member of a structure type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe structure type.
Returns
A reference to the structure.

◆ Add() [10/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cStructureType & oTypeDefinition )
inline

Adds a new member of a structure type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe structure type.
Returns
A reference to the structure.

◆ Add() [11/12]

structure & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
MemberType void::* pMemberOffset,
const cStructureType & oTypeDefinition )
inline

Adds a new member of a structure type.

Parameters
[in]strNameThe name of the member.
[in]pMemberOffsetThe pointer to the member.
[in]oTypeDefinitionThe structure type.
Returns
A reference to the structure.

◆ Add() [12/12]

template<typename ArithmeticType>
std::enable_if< std::is_arithmetic< ArithmeticType >::value, structure >::type & adtf::mediadescription::flash::structure< void >::Add ( const std::string & strName,
size_t nArrayCount = 1,
size_t nAlignment = 0,
int32_t nBytePosition = -1,
bool bLittleEndian = true )
inline

Adds a new member of arithmetic type (POD)

Parameters
[in]strNameThe name of the member.
[in]nArrayCountThe array size of the member.
[in]nAlignmentThe Alignment of the member. 0 => alignment is taken from the type.
[in]nBytePositionThe byte position in the serialized representation.
[in]bLittleEndianWhether the value in the serialized representation is little endian or not.
Returns
A reference to the structure.

◆ GetAlignment()

size_t adtf::mediadescription::flash::structure< void >::GetAlignment ( ) const
overridevirtual
Returns
The default alignment of the type.

Reimplemented from adtf::mediadescription::flash::cStructureType.

◆ GetSize()

size_t adtf::mediadescription::flash::structure< void >::GetSize ( ) const
overridevirtual
Returns
The size of the type.

Reimplemented from adtf::mediadescription::flash::cStructureType.


The documentation for this class was generated from the following file: