ADTF  3.13.0
Object-oriented representation of the DDL (OO-DDL)

Introduction

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.

Note
These classes are associated by using the GoF design patterns "Visitor", "Decorator", and "Factory Method". The main classes are described in the following section.

Structure of classes

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.

Building up - using IDDLFactoryMethod

For all creation tasks concerning OO-DDL implementations of the interface IDDLFactoryMethod are used. A basic implementation of IDDLFactoryMethod is cDDLImporter.

Processing DDL - using IDDLVisitor

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.

The Correlation Between OO-DDL and DDL.

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/AttributeOO-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=xxxcDDLAlignment
byteorder=xxxcDDLByteorder
<stream>cDDLStream
<struct> (within a <stream> tag)cDDLStreamStruct

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Sep 28 2021 by doxygen 1.8.14)