ADTF  3.18.2
cDDLPrinter

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

Inheritance diagram for cDDLPrinter:
[legend]

Public Member Functions

 cDDLPrinter (const bool &bFullOut=true)
 Constructor.
 
tResult VisitDDL (cDDLDescription *poDescription)
 Visitor for a whole DDL description. More...
 
tResult Visit (cDDLHeader *poHeader)
 Visitor for DDL header objects. More...
 
tResult Visit (cDDLDataType *poDataType)
 Visitor for DDL datatype objects. More...
 
tResult Visit (cDDLComplex *poComplex)
 Visitor for DDL struct objects. More...
 
tResult Visit (cDDLStream *poStream)
 Visitor for DDL stream objects. More...
 
tResult Visit (cDDLUnit *poUnit)
 Visitor for DDL unit objects. More...
 
tResult Visit (cDDLBaseunit *poBaseunit)
 Visitor for DDL baseunit objects. More...
 
tResult Visit (cDDLExtDeclaration *poExtDeclaration)
 Visitor for external DDL declaration objects. More...
 
tResult Visit (cDDLElement *poElement)
 Visitor for DDL element objects. More...
 
tResult Visit (cDDLPrefix *poPrefix)
 Visitor for DDL prefix objects. More...
 
tResult Visit (cDDLRefUnit *poRefUnit)
 Visitor for DDL reference unit objects. More...
 
tResult Visit (cDDLStreamStruct *poStreamStruct)
 Visitor for DDL streamstruct objects. More...
 
tResult Visit (cDDLEnum *poEnum)
 Visitor for DDL enum objects. More...
 
tResult Visit (cDDLStreamMetaType *poStreamMetaType)
 Visitor for DDL stream meta type objects. More...
 
tResult Visit (cDDLProperty *poProperty)
 Visitor for DDL property objects. More...
 
A_UTILS_NS::cString GetXML () const
 Getter for the XML string of the collected DDL information. More...
 
tResult ToFile (const A_UTILS_NS::cString &strFilename) const
 Saves the collected DDL information as XML to the specified file. More...
 
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. More...
 
- 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.

◆ 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

◆ 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

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.