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

Concrete Visitor to collect the data of a DDL in object-representation and convert it back to XML (string or file). More...

#include <ddlprinter.h>

Inheritance diagram for cDDLPrinter:
[legend]

Public Member Functions

 cDDLPrinter (const bool &bFullOut=true)
 Constructor.
 
tResult VisitDDL (cDDLDescription *poDescription)
 Visitor for a whole DDL description.
 
tResult Visit (cDDLHeader *poHeader)
 Visitor for DDL header objects.
 
tResult Visit (cDDLDataType *poDataType)
 Visitor for DDL datatype objects.
 
tResult Visit (cDDLComplex *poComplex)
 Visitor for DDL struct objects.
 
tResult Visit (cDDLStream *poStream)
 Visitor for DDL stream objects.
 
tResult Visit (cDDLUnit *poUnit)
 Visitor for DDL unit objects.
 
tResult Visit (cDDLBaseunit *poBaseunit)
 Visitor for DDL baseunit objects.
 
tResult Visit (cDDLExtDeclaration *poExtDeclaration)
 Visitor for external DDL declaration objects.
 
tResult Visit (cDDLElement *poElement)
 Visitor for DDL element objects.
 
tResult Visit (cDDLPrefix *poPrefix)
 Visitor for DDL prefix objects.
 
tResult Visit (cDDLRefUnit *poRefUnit)
 Visitor for DDL reference unit objects.
 
tResult Visit (cDDLStreamStruct *poStreamStruct)
 Visitor for DDL streamstruct objects.
 
tResult Visit (cDDLEnum *poEnum)
 Visitor for DDL enum objects.
 
tResult Visit (cDDLStreamMetaType *poStreamMetaType)
 Visitor for DDL stream meta type objects.
 
tResult Visit (cDDLProperty *poProperty)
 Visitor for DDL property objects.
 
A_UTILS_NS::cString GetXML () const
 Getter for the XML string of the collected DDL information.
 
tResult ToFile (const A_UTILS_NS::cString &strFilename) const
 Saves the collected DDL information as XML to the specified file.
 
tResult ForceVersion (double fForcedVersion)
 The method ForceVersion makes the printer ignore the DDL language version set in the header of the description to be printed.
 
- Public Member Functions inherited from IDDLVisitor
virtual ~IDDLVisitor ()
 DTOR.
 

Private Attributes

A_UTILS_NS::cDOM m_oDOM
 
double m_fVersion
 
bool m_bFullOut
 
A_UTILS_NS::cString m_strLastPath
 
double m_fForcedVersion
 

Detailed Description

Concrete Visitor to collect the data of a DDL in object-representation and convert it back to XML (string or file).

Definition at line 19 of file ddlprinter.h.

Member Function Documentation

◆ ForceVersion()

tResult ForceVersion ( double fForcedVersion)

The method ForceVersion makes the printer ignore the DDL language version set in the header of the description to be printed.

To take effect, this method must be called before calling VisitDDL()

Parameters
[in]fForcedVersionThe version the printer use for output. Use the flags defined in IMediaDescription::tMediaDescriptionFlags.
Returns
Standard result code.
Return values
ERR_NOERROREverything went fine
ERR_INVALID_VERSIONUnknown version passed.

References ForceVersion().

Referenced by ForceVersion().

◆ GetXML()

A_UTILS_NS::cString GetXML ( ) const

Getter for the XML string of the collected DDL information.

Returns
the XML string containing the DDL description

References GetXML().

Referenced by GetXML().

◆ ToFile()

tResult ToFile ( const A_UTILS_NS::cString & strFilename) const

Saves the collected DDL information as XML to the specified file.

Parameters
[in]strFilename- Path to file to use
Return values
ERR_FAILEDSaving process failed

References ToFile().

Referenced by ToFile().

◆ Visit() [1/14]

tResult Visit ( cDDLBaseunit * poBaseunit)
virtual

Visitor for DDL baseunit objects.

Parameters
[in]poBaseunit- Pointer to the baseunit object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [2/14]

tResult Visit ( cDDLComplex * poStruct)
virtual

Visitor for DDL struct objects.

Parameters
[in]poStruct- Pointer to the struct object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [3/14]

tResult Visit ( cDDLDataType * poDataType)
virtual

Visitor for DDL datatype objects.

Parameters
[in]poDataType- Pointer to the datatype object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.
ERR_NOT_SUPPORTEDData type detected which is not supported.

Implements IDDLVisitor.

References Visit().

◆ Visit() [4/14]

tResult Visit ( cDDLElement * poElement)
virtual

Visitor for DDL element objects.

Parameters
[in]poElement- Pointer to the element object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [5/14]

tResult Visit ( cDDLEnum * poEnum)
virtual

Visitor for DDL enum objects.

Parameters
[in]poEnum- Pointer to the enum object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [6/14]

tResult Visit ( cDDLExtDeclaration * poExtDeclaration)
virtual

Visitor for external DDL declaration objects.

Parameters
[in]poExtDeclaration- Pointer to the extdeclaration object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [7/14]

tResult Visit ( cDDLHeader * poHeader)
virtual

Visitor for DDL header objects.

Parameters
[in]poHeader- Pointer to the header object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

Referenced by Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), Visit(), and Visit().

◆ Visit() [8/14]

tResult Visit ( cDDLPrefix * poPrefix)
virtual

Visitor for DDL prefix objects.

Parameters
[in]poPrefix- Pointer to the prefix object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [9/14]

tResult Visit ( cDDLProperty * poProperty)
virtual

Visitor for DDL property objects.

Parameters
[in]poProperty- Pointer to the object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [10/14]

tResult Visit ( cDDLRefUnit * poRefUnit)
virtual

Visitor for DDL reference unit objects.

Parameters
[in]poRefUnit- Pointer to the refunit object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [11/14]

tResult Visit ( cDDLStream * poStream)
virtual

Visitor for DDL stream objects.

Parameters
[in]poStream- Pointer to the stream object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [12/14]

tResult Visit ( cDDLStreamMetaType * poStreamMetaType)
virtual

Visitor for DDL stream meta type objects.

Parameters
[in]poStreamMetaType- Pointer to the object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [13/14]

tResult Visit ( cDDLStreamStruct * poStreamStruct)
virtual

Visitor for DDL streamstruct objects.

Parameters
[in]poStreamStruct- Pointer to the streamstruct object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ Visit() [14/14]

tResult Visit ( cDDLUnit * poUnit)
virtual

Visitor for DDL unit objects.

Parameters
[in]poUnit- Pointer to the unit object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.

Implements IDDLVisitor.

References Visit().

◆ VisitDDL()

tResult VisitDDL ( cDDLDescription * poDescription)
virtual

Visitor for a whole DDL description.

Parameters
[in]poDescription- Pointer to the description object
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.
ERR_NOT_INITIALIZEDNot yet initialized

Implements IDDLVisitor.

References VisitDDL().

Referenced by VisitDDL().

Member Data Documentation

◆ m_bFullOut

bool m_bFullOut
private

Definition at line 75 of file ddlprinter.h.

◆ m_fForcedVersion

double m_fForcedVersion
private

Definition at line 77 of file ddlprinter.h.

◆ m_fVersion

double m_fVersion
private

Definition at line 74 of file ddlprinter.h.

◆ m_oDOM

A_UTILS_NS::cDOM m_oDOM
private

Definition at line 73 of file ddlprinter.h.

◆ m_strLastPath

A_UTILS_NS::cString m_strLastPath
private

Definition at line 76 of file ddlprinter.h.