ADTF
Loading...
Searching...
No Matches
cDDLPrinter

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

#include <ddl_printer.h>

Public Member Functions

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

Private Attributes

std::string m_strDescription
 

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 ddl::DDStructure &oStructure)
Initializes the printer with an existing structure definition.
This is used to create a structure type from an existing c++ struct definition.
structure & Add(const std::string &strName, MemberType T::*pMemberOffset)
Adds a new member of arithmetic type (POD).

Definition at line 37 of file ddl_printer.h.

Constructor & Destructor Documentation

◆ cDDLPrinter()

cDDLPrinter ( const ddl::DDStructure & 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.

Member Data Documentation

◆ m_strDescription

std::string m_strDescription
private

Definition at line 53 of file ddl_printer.h.