ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::flash::cStructureType Class Reference

#include <type_reflection_legacy.h>

Inherits adtf::mediadescription::flash::cType.

Inherited by adtf::mediadescription::flash::structure< void >, adtf::mediadescription::flash::structure< T >, and adtf::mediadescription::flash::structure< void >.

Classes

struct  member
 

Public Member Functions

 cStructureType (const std::string &strName, size_t nSize, size_t nAlignment)
 
 cStructureType (const cStructureType &oOther)
 
std::string GetName () const override
 
size_t GetSize () const override
 
size_t GetAlignment () const override
 
const std::vector< member > & GetMembers () const
 
std::pair< std::string, std::string > GetAsStringPair () const
 
 operator std::pair< std::string, std::string > () const
 

Protected Member Functions

void Add (member &&sNewMember)
 

Detailed Description

Type implementation for structures.

Do not use this class directly, but use structure instead.

Constructor & Destructor Documentation

◆ cStructureType()

adtf::mediadescription::flash::cStructureType::cStructureType ( const std::string & strName,
size_t nSize,
size_t nAlignment )

Initializes the structure type

Parameters
[in]strNameThe name.
[in]nSizeThe size in bytes.
[in]nAlignmentThe default alignment.

Member Function Documentation

◆ Add()

void adtf::mediadescription::flash::cStructureType::Add ( member && sNewMember)
protected

Adds a new member to the structure.

Parameters
[in]sNewMemberThe new member.

◆ GetAlignment()

size_t adtf::mediadescription::flash::cStructureType::GetAlignment ( ) const
overridevirtual
Returns
The default alignment of the type.

Implements adtf::mediadescription::flash::cType.

Reimplemented in adtf::mediadescription::flash::structure< void >.

◆ GetAsStringPair()

std::pair< std::string, std::string > adtf::mediadescription::flash::cStructureType::GetAsStringPair ( ) const

Legacy conversion to a pair of (first) md_struct and (second)md_description.

Returns
A list of all members of the structure.

◆ GetMembers()

const std::vector< member > & adtf::mediadescription::flash::cStructureType::GetMembers ( ) const
Returns
A list of all members of the structure.

◆ GetName()

std::string adtf::mediadescription::flash::cStructureType::GetName ( ) const
overridevirtual
Returns
The name of the type.

Implements adtf::mediadescription::flash::cType.

◆ GetSize()

size_t adtf::mediadescription::flash::cStructureType::GetSize ( ) const
overridevirtual
Returns
The size of the type.

Implements adtf::mediadescription::flash::cType.

Reimplemented in adtf::mediadescription::flash::structure< void >.

◆ operator std::pair< std::string, std::string >()

adtf::mediadescription::flash::cStructureType::operator std::pair< std::string, std::string > ( ) const
inline

Legacy conversion operator to a pair of (first) md_struct and (second)md_description.

Returns
A list of all members of the structure.

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