ADTF
3.18.2
|
To facilitate the handling of DDL hierarchies there is an object-oriented approach of representation, called OO-DDL.
Within the class structure of OO-DDL every node type inside the DDL definition is representated by an own class.
The basic interface of nearly all classes of the OO-DDL is IDDL
. The root element of every DDL structure is an instance of cDDLDescription
. For example a DDL Definition File may be represented by cDDLDescription
. This object holds references to the main parts like the header (cDDLHeader
) or the datatypes (IDDLDataType
). For further information on all available OO-DDL classes see the SDK documentation of IDDL
.
Every link between DDL-representing objects is realized as pointer to the according object. So lots of string comparisons for matching e.g. child elements could be removed.
For all creation tasks concerning OO-DDL implementations of the interface IDDLFactoryMethod
are used. A basic implementation of IDDLFactoryMethod
is cDDLImporter
.
For every task of processing DDL implementations of IDDLVisitor
are used. Utilizing this interface the DDL-representing hierarchy can be walked through and appropriate actions may be taken. The basic implementation of IDDLVisitor
is cDDLPrinter
.
Every tag and some attributes in the DDL have a correspondent in the OO-DDL. The following table shows the OO-DDL classes with their matching DDL tag or attribute:
DDL Tag/Attribute | OO-DDL Class |
---|---|
<adtf:ddl> | cDDLDescription |
<header> | cDDLHeader |
<ext_declaration> | cDDLExtDeclaration |
<baseunit> | cDDLBaseunit |
<prefix> | cDDLPrefix |
<unit> | cDDLUnit |
<refUnit> | cDDLRefUnit |
<datatype> | cDDLDataType |
<enum> | cDDLEnum |
<struct> | cDDLComplex |
<element> | cDDLElement |
alignment=xxx | cDDLAlignment |
byteorder=xxx | cDDLByteorder |
<stream> | cDDLStream |
<struct> (within a <stream> tag) | cDDLStreamStruct |