7 #ifndef _DDL_IMPORTER_H_INCLUDED_
8 #define _DDL_IMPORTER_H_INCLUDED_
12 class cDDLDescription;
18 typedef enum eImporterMsgSeverity
29 typedef struct sImporterMsg
63 bool bBasicCheck =
true,
73 cDDLImporter(
const char* strFile,
bool bBasicCheck =
true,
bool bSorted =
true);
82 cDDLImporter(
int nCreationLevel,
bool bBasicCheck =
true,
bool bSorted =
true);
329 int m_nCreationLevel;
359 bool m_bMergeDefaults;
361 bool m_bPrefereReference;
representation for an element of the cDom
cDOM implements a XML parser which can be used to read in XML files and perform simple (!...
A common result class usable as return value throughout.
Abstract base class/interface for Factory Method design-pattern.
Representation of a base unit inside a DDL description.
Representation for a complex datatype inside a DDL specification.
Representation for a (simple) data type inside a DDL description.
Main class representing a whole DDL description.
Representation for an enum inside a DDL description.
Concrete Factory Method for building up a DDL from a XML file.
tResult BuildStreams()
Method to build a streams object hierarchy.
tResult BuildSingleBaseunit(cDDLBaseunit **ppoNewBU, A_UTILS_NS::cDOMElementRef poBUElement)
Creates a baseunit object from the given DOMElement.
cDDLImporter(bool bBasicCheck=true, bool bSorted=true)
Default CTOR.
void SetMergeDefaults(bool bMergeDefaults=true)
Setter to enable disable the merge of DDL defaults (units, datattypes, etc.)
tResult SetFile(A_UTILS_NS::cFilename const strFile)
Setter for the source file.
tResult BuildSingleStruct(cDDLComplex **ppoNewStruct, A_UTILS_NS::cDOMElement *poStructElement)
Creates a struct object from the given DOMElement.
tResult SetXML(const A_UTILS_NS::cString &strXML)
Setter for a XML string containing the DDL to import.
tResult BuildStructs()
Method to build a structs object hierarchy.
tResult BuildSingleUnit(cDDLUnit **ppoNewUnit, A_UTILS_NS::cDOMElementRef poUnitElement)
Creates a unit object from the given DOMElement.
static void DestroyDDL(cDDLDescription *poDDL)
Static method to destroy the given DDL hierarchy.
void SetPreferReferenceEntities(bool bPrefereReference=true)
Setter to switch from prefereing entities from the reference DDL, to using the reference enties only ...
cDDLImporter(int nCreationLevel, bool bBasicCheck=true, bool bSorted=true)
CTOR with creation level.
A_UTILS_NS::cString GetLastErrorDesc() const
Getter for the most recent error description.
void DestroyDDL()
Method to destroy the DDL object and all contained objects.
tResult BuildSinglePrefix(cDDLPrefix **ppoNewPrefix, A_UTILS_NS::cDOMElementRef poPrefixElement)
Creates a prefix object from the given DOMElement.
tResult BuildSingleStream(cDDLStream **ppoNewStream, A_UTILS_NS::cDOMElement *poStreamElement)
Creates a DDL stream object from the given DOMElement.
void SetCreationLevel(int const nLevel=1)
Setter for the creation level.
tResult BuildHeader()
Method to build a header object.
tImporterMsgList GetAllMessages() const
Getter for all detected errors.
tResult BuildSingleDatatype(cDDLDataType **ppoNewDatatype, A_UTILS_NS::cDOMElement *poDTElement)
Creates a datatype object from the given DOMElement.
tResult CreatePartial(const cDDLDescription *poRefDDL, double fVersion)
Method to create a partial DDL (e.g.
cDDLDescription * GetDDL() const
Getter for the DDL object.
cDDLImporter(const A_UTILS_NS::cFilename &strFile, bool bBasicCheck=true, bool bSorted=true)
CTOR with file name/path.
tResult CreateNew(double fVersion=0)
Method to build up a new DDL hierarchy.
tResult SetDOM(A_UTILS_NS::cDOM *poDOM)
Setter for a DOM.
tResult BuildStreamMetaTypes()
Method to build a streams object hierarchy.
tResult BuildEnums()
Method to build a enums object hierarchy.
void PrintAllMessages(tImporterMsgSeverity eLeastSeverity=eImporterInfo)
Method to log all messages which have at least the given severity to console.
A_UTILS_NS::cString GetErrorDesc() const
Getter for the description of the last error.
tResult BuildSingleStreamMetaType(A_UTILS_NS::cDOMElement *poStreamMetaTypeElement, tDDLStreamMetaTypeVec &vecStreamMetaTypes)
Creates a DDL stream object from the given DOMElement.
cDDLImporter(const char *strFile, bool bBasicCheck=true, bool bSorted=true)
CTOR with file name/path.
void PushMessage(const A_UTILS_NS::cString &strMsg, tImporterMsgSeverity eSeverity)
Helper method to create a message and save it in the appropriate container.
tResult BuildDatatypes()
Method to build a datatypes object hierarchy.
T * TryToFind(const A_UTILS_NS::cString &strName, cDDLContainer< T > &vecFirstData, cDDLContainer< T > &vecSecondData)
Helper method to find specific elements inside the given vecFirstData by Name.
tResult BuildUnits()
Method to build a units object hierarchy.
tResult BuildSingleEnum(cDDLEnum **ppoNewEnum, A_UTILS_NS::cDOMElement *poEnumElement)
Creates an enum object from the given DOMElement.
void SetFullCheckDescriptionMode(bool bFullCheck=false)
Setter for the validation mode.
Representation of a prefix in a DDL description.
Representation of a stream inside a DDL description.
Representation object of a unit.
Namespace for the mainpage_pkg_ddl.
std::list< tImporterMsg > tImporterMsgList
Container for error descriptions.
tImporterMsgSeverity
enumeration type for message severity
error description structure type
A_UTILS_NS::cString strDesc
string of the message
tImporterMsgSeverity eSeverity
enumeration type for message severity