ADTF  3.18.2
cDDLPrinter

Generates a DDL description from a structure definition. More...

Public Member Functions

 cDDLPrinter (const cStructureType &oStructure)
 Initializes the printer with an existing structure definition. More...
 
void PrintTo (std::ostream &oStream) const
 Prints the DDL description to the given stream. More...
 

Private Member Functions

size_t GetMinimumAlignment (size_t nExpectedOffset, size_t nCurrentOffset, const std::string &strMemberName)
 
void AddStructure (const cStructureType &oStructure)
 
void AddEnumeration (const cEnumerationType &oEnumeration)
 
bool HasStructure (const cStructureType &oStructure)
 
bool HasEnumeration (const cEnumerationType &oEnumeration)
 

Private Attributes

std::vector< std::pair< std::string, std::string > > m_oStructures
 
std::vector< std::pair< std::string, std::string > > m_oEnumerations
 

Detailed Description

Generates a DDL description from a structure definition.

Example Usage

auto oType = structure<>("tStruct")
.Add<uint8_t>("nValue1")
.Add<uint8_t>("nValue2");
std::cout << cDDLPrinter(oType);
cDDLPrinter(const cStructureType &oStructure)
Initializes the printer with an existing structure definition.

Definition at line 30 of file ddl_printer_legacy.h.

Constructor & Destructor Documentation

◆ cDDLPrinter()

cDDLPrinter ( const cStructureType oStructure)

Initializes the printer with an existing structure definition.

Parameters
[in]oStructureThe structure definition.

Member Function Documentation

◆ PrintTo()

void PrintTo ( std::ostream &  oStream) const

Prints the DDL description to the given stream.

Parameters
[in]oStreamThe stream.