ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cDDLStreamStruct

Decorator class for cDDLComplex to be used inside cDDLStream objects. More...

#include <ddlstreamstruct.h>

Inheritance diagram for cDDLStreamStruct:
[legend]

Public Member Functions

 cDDLStreamStruct ()
 Default CTOR.
 
 cDDLStreamStruct (cDDLComplex *poType, unsigned int const uiBytepos, const A_UTILS_NS::cString &strName=A_UTILS_NS::cString::Empty)
 CTOR.
 
 cDDLStreamStruct (cDDLStreamStruct &oStruct)
 CTOR.
 
 ~cDDLStreamStruct ()
 DTOR.
 
tResult Accept (IDDLVisitor *poVisitor)
 Acceptance method for Visitor design-pattern.
 
bool IsInitialized () const
 Getter for the initialization flag.
 
tResult Create (cDDLComplex *poType, unsigned int const uiBytepos, const A_UTILS_NS::cString &strName=A_UTILS_NS::cString::Empty)
 Creation method to fill the object with data.
 
const A_UTILS_NS::cStringGetType () const
 Getter for the name of the complex data type.
 
void SetType (cDDLComplex *const pType)
 Setter for the complex data-type object.
 
cDDLComplexGetTypeObject () const
 Getter for the complex data-type object.
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name.
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name.
 
unsigned int GetBytepos () const
 Getter for the byte position.
 
void SetBytepos (unsigned int const uiBytepos)
 Setter for the byte position.
 
- Public Member Functions inherited from cDDL
virtual ~cDDL ()
 DTOR.
 
virtual bool IsPredefined () const
 Getter for the predefinition flag.
 
virtual bool IsOverwriteable () const
 Getter for the predefinition flag.
 
virtual int GetCreationLevel () const
 Getter for the creation level.
 
- Public Member Functions inherited from IDDL
virtual ~IDDL ()
 Virtual DTOR.
 

Private Attributes

cDDLComplexm_poType
 
unsigned int m_uiBytepos
 
A_UTILS_NS::cString m_strName
 
bool m_bInitFlag
 

Additional Inherited Members

- Public Types inherited from IDDL
enum  tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 }
 Flags for Merging. More...
 
- Static Public Member Functions inherited from cDDL
template<typename T>
static T * DeleteChild (T *pvObj)
 Functor for use with std::transform() to delete all objects where the elements of a vector point at.
 
template<typename T>
static tResult MoveChild (T *pvObj, const int nFrom, const int nTo)
 Method moves element within the list.
 
template<typename T>
static T * Clone (T *pvObj)
 Functor for use with std::transform() to clone the objects where the elements of a vector point at.
 
template<typename T>
static T * Ref (T *pvObj)
 Functor for use with std::transform() to ref the objects where the elements of a vector point at, this is for the Always_there.
 
static bool IsEqual (IDDL *poLHS, IDDL *poRHS)
 Predicate to compare 2 DDL representation objects (for use with std::unique()).
 
static bool IsSorted (IDDL *poLHS, IDDL *poRHS)
 Sort predicate to compare to 2 DDL representation objects (for use with std::sort()).
 

Detailed Description

Decorator class for cDDLComplex to be used inside cDDLStream objects.

Definition at line 18 of file ddlstreamstruct.h.

Constructor & Destructor Documentation

◆ cDDLStreamStruct() [1/2]

cDDLStreamStruct ( cDDLComplex * poType,
unsigned int const uiBytepos,
const A_UTILS_NS::cString & strName = A_UTILS_NS::cString::Empty )

CTOR.

Parameters
[in]poType- Pointer to complex datatype object
[in]uiBytepos- Byte position of the complex datatype
[in]strName- Name of the stream structure (optional)
Remarks
If the name of the stream structure is not set then the type name is used.

References string_base< cStackString >::Empty.

◆ cDDLStreamStruct() [2/2]

CTOR.

Parameters
[in]oStruct- existing DDLStream object

References cDDLStreamStruct().

Member Function Documentation

◆ Accept()

tResult Accept ( IDDLVisitor * poVisitor)
virtual

Acceptance method for Visitor design-pattern.

Parameters
[in]poVisitor- Pointer to Visitor instance
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.
ERR_NOT_INITIALIZEDThe object was not or not correctly initialized

Implements IDDL.

◆ Create()

tResult Create ( cDDLComplex * poType,
unsigned int const uiBytepos,
const A_UTILS_NS::cString & strName = A_UTILS_NS::cString::Empty )

Creation method to fill the object with data.

Parameters
[in]poType- Pointer to complex datatype object
[in]uiBytepos- Byte position of the complex datatype
[in]strName- Name of the stream structure (optional)
Return values
ERR_POINTERNull-pointer committed
Remarks
If the name of the stream structure is not set then the type name is used.

References string_base< cStackString >::Empty.

◆ GetBytepos()

unsigned int GetBytepos ( ) const

Getter for the byte position.

Returns
the byte position

◆ GetName()

const A_UTILS_NS::cString & GetName ( ) const
virtual

Getter for the name.

Returns
the name

Implements IDDL.

◆ GetType()

const A_UTILS_NS::cString & GetType ( ) const

Getter for the name of the complex data type.

Returns
name of the type object

◆ GetTypeObject()

cDDLComplex * GetTypeObject ( ) const

Getter for the complex data-type object.

Returns
pointer to the complex data-type object

◆ IsInitialized()

bool IsInitialized ( ) const
virtual

Getter for the initialization flag.

Return values
trueThe object was initialized correctly
falseThe object was not or not correctly initialized

Reimplemented from cDDL.

◆ SetBytepos()

void SetBytepos ( unsigned int const uiBytepos)

Setter for the byte position.

Parameters
[in]uiBytepos- the byte position
Returns
void

◆ SetName()

void SetName ( const A_UTILS_NS::cString & strName)

Setter for the name.

Parameters
[in]strName- Name of the stream structure
Returns
void

◆ SetType()

void SetType ( cDDLComplex *const pType)

Setter for the complex data-type object.

Parameters
[in]pType- complex data-type object
Returns
void

Member Data Documentation

◆ m_bInitFlag

bool m_bInitFlag
private

Definition at line 116 of file ddlstreamstruct.h.

◆ m_poType

cDDLComplex* m_poType
private

Definition at line 113 of file ddlstreamstruct.h.

◆ m_strName

A_UTILS_NS::cString m_strName
private

Definition at line 115 of file ddlstreamstruct.h.

◆ m_uiBytepos

unsigned int m_uiBytepos
private

Definition at line 114 of file ddlstreamstruct.h.