ADTF  3.18.2
cStructureType

Type implementation for structures. More...

Inheritance diagram for cStructureType:
[legend]

Classes

struct  member
 All information about a structure member. More...
 

Public Member Functions

 cStructureType (const std::string &strName, size_t nSize, size_t nAlignment)
 Initializes the structure type. More...
 
 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
 Legacy conversion to a pair of (first) md_struct and (second)md_description. More...
 
 operator std::pair< std::string, std::string > () const
 Legacy conversion operator to a pair of (first) md_struct and (second)md_description. More...
 

Protected Member Functions

void Add (member &&sNewMember)
 Adds a new member to the structure. More...
 

Private Attributes

std::string m_strName
 
size_t m_nSize
 
size_t m_nAlignment
 
std::vector< memberm_oMembers
 

Detailed Description

Type implementation for structures.

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

Definition at line 267 of file type_reflection_legacy.h.

Constructor & Destructor Documentation

◆ 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 Add ( member &&  sNewMember)
protected

Adds a new member to the structure.

Parameters
[in]sNewMemberThe new member.

Referenced by structure< T >::Add().

◆ GetAlignment()

size_t GetAlignment ( ) const
overridevirtual
Returns
The default alignment of the type.

Implements cType.

Reimplemented in structure< void >.

◆ GetAsStringPair()

std::pair<std::string, std::string> GetAsStringPair ( ) const

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

Returns
A list of all members of the structure.

Referenced by cStructureType::operator std::pair< std::string, std::string >().

◆ GetMembers()

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

◆ GetName()

std::string GetName ( ) const
overridevirtual
Returns
The name of the type.

Implements cType.

◆ GetSize()

size_t GetSize ( ) const
overridevirtual
Returns
The size of the type.

Implements cType.

Reimplemented in structure< void >.

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

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.

Definition at line 316 of file type_reflection_legacy.h.

References cStructureType::GetAsStringPair().