ADTF
|
Validation and correction class for ADTF DDL for use with the. More...
Classes | |
struct | tStructInfo |
Public Member Functions | |
cDDLInspector (bool bAutoCorrect=false) | |
CTOR. More... | |
virtual | ~cDDLInspector () |
DTOR. | |
virtual tResult | VisitDDL (cDDLDescription *poDescription) |
Visitor for a whole DDL description. More... | |
virtual tResult | Visit (cDDLHeader *poHeader) |
Visitor for DDL header objects. More... | |
virtual tResult | Visit (cDDLDataType *poDataType) |
Visitor for DDL datatype objects. More... | |
virtual tResult | Visit (cDDLComplex *poComplex) |
Visitor for DDL struct objects. More... | |
virtual tResult | Visit (cDDLStream *poStream) |
Visitor for DDL stream objects. More... | |
virtual tResult | Visit (cDDLUnit *poUnit) |
Visitor for DDL unit objects. More... | |
virtual tResult | Visit (cDDLBaseunit *poBaseunit) |
Visitor for DDL baseunit objects. More... | |
virtual tResult | Visit (cDDLExtDeclaration *poExtDeclaration) |
Visitor for external DDL declaration objects. More... | |
virtual tResult | Visit (cDDLElement *poElement) |
Visitor for DDL element objects. More... | |
virtual tResult | Visit (cDDLPrefix *poPrefix) |
Visitor for DDL prefix objects. More... | |
virtual tResult | Visit (cDDLRefUnit *poRefUnit) |
Visitor for DDL reference unit objects. More... | |
virtual tResult | Visit (cDDLStreamStruct *poStreamStruct) |
Visitor for DDL streamstruct objects. More... | |
virtual tResult | Visit (cDDLEnum *poEnum) |
Visitor for DDL enum objects. More... | |
virtual tResult | Visit (cDDLStreamMetaType *poStreamMetaType) |
Visitor for DDL stream meta type objects. More... | |
virtual tResult | Visit (cDDLProperty *poProperty) |
Visitor for DDL property objects. More... | |
void | SetAutoCorrect (bool bAutoCorrect) |
Setter for the auto-correction flag. More... | |
bool | GetAutoCorrect () const |
Getter for the auto-correction flag. More... | |
tImporterMsgList | GetSuggestions () const |
Getter for the list of suggestions. More... | |
A_UTILS_NS::cString | GetLastErrorDesc () const |
Getter for the most recent error description. More... | |
void | InitNewCheck () |
Init a new Check, clear all list and init all variables. | |
unsigned int | GetLastBytePosOfAStructCorrected (const A_UTILS_NS::cString &strStructName) |
Returns the last corrected Bytepos position inclusive the last Element size. More... | |
unsigned int | GetLastBytePosOfAStructReal (const A_UTILS_NS::cString &strStructName) |
Returns the actual last Bytepos inclusive the last Element size. More... | |
![]() | |
virtual | ~IDDLVisitor () |
DTOR. | |
Static Public Member Functions | |
static tImporterMsgList | CheckValidyOfNestedStructs (const cDDLDescription *poDescription) |
Check the validy of nested structs. More... | |
Protected Member Functions | |
tResult | AddSuggestion (A_UTILS_NS::cString const &strDesc, tImporterMsgSeverity const eSeverity) |
Method for derived classes to add an own suggestion. More... | |
virtual bool | IsAlignable (size_t const posBytePos, size_t const szElementSize) |
Helper method to check if the element is alignable. More... | |
Static Protected Member Functions | |
static bool | LessDDL (const A_UTILS_NS::cString &strLHS, const A_UTILS_NS::cString &strRHS, const cDDLDataType *poType) |
Helper method which returns whether the left-hand-side argument compares less than the right-hand-side one (as returned by operator <) based on given DDL type information. More... | |
Static Private Member Functions | |
static bool | CheckValidyOfNestedStructs (const cDDLDescription *poDescription, const A_UTILS_NS::cString &strStructTypeName, const A_UTILS_NS::cString &strNestedStructTypeName, A_UTILS_NS::cString &strLog, int nStructDepth=1) |
Recursive helper function for check of the validy of nested structs within a struct. More... | |
Private Attributes | |
cDDLDescription * | m_poDDL |
bool | m_bAutoCorrect |
tImporterMsgList | m_lstSuggestions |
The list contains all warnings and errors. | |
A_UTILS_NS::cStringList | m_strLstComplexName |
The list contains all names of the structs. More... | |
A_UTILS_NS::cStringList | m_strLstDataTypesName |
The list contains all names of the data types. More... | |
A_UTILS_NS::cStringList | m_strLstEnumsName |
The list contains all names of the enum. More... | |
A_UTILS_NS::cStringList | m_strLstEnumsValues |
The list contains all names of the enum values. More... | |
A_UTILS_NS::cStringList | m_strLstBaseunitName |
The list contains all names of the base unit names. More... | |
A_UTILS_NS::cStringList | m_strLstStreamsName |
The list contains all names of the streams. More... | |
A_UTILS_NS::cStringList | m_strLstPrefixName |
The list contains all names of the prefixes. More... | |
A_UTILS_NS::cStringList | m_strLstUnitName |
The list contains all names of the unit names. More... | |
double | m_fVersion |
bool | m_bHasDynamicArrays |
std::map< cDDLComplex *, tStructInfo > | m_mapStructInfos |
Validation and correction class for ADTF DDL for use with the.
Definition at line 21 of file ddlinspector.h.
cDDLInspector | ( | bool | bAutoCorrect = false | ) |
CTOR.
[in] | bAutoCorrect | - Flag for implicit auto-correction (optional) |
|
protected |
Method for derived classes to add an own suggestion.
[in] | strDesc | Suggestion message |
[in] | eSeverity | Message severity |
ERR_EMPTY | The suggestion message must not be empty. |
ERR_INVALID_ARG | The message severity must have a valid value of type adtf::tImporterMsgSeverity . |
|
static |
Check the validy of nested structs.
[in] | poDescription | - pointer of the Description within you want to check a vality of nested structs |
Error | message list |
|
staticprivate |
Recursive helper function for check of the validy of nested structs within a struct.
[in] | poDescription | - pointer of the Description within you want to check a vality of a struct |
[in] | strStructTypeName | - name of the Struct where you want to check for invalid nested structs |
[in] | strNestedStructTypeName | - name of the nested Struct |
[out] | strLog | - Log of error message, if validy is failed |
[in] | nStructDepth | - Depth of the nested stuct |
true | if valid |
false | otherwise |
bool GetAutoCorrect | ( | ) | const |
Getter for the auto-correction flag.
unsigned int GetLastBytePosOfAStructCorrected | ( | const A_UTILS_NS::cString & | strStructName | ) |
Returns the last corrected Bytepos position inclusive the last Element size.
[in] | strStructName | - name of the Struct where you want the last element |
unsigned int GetLastBytePosOfAStructReal | ( | const A_UTILS_NS::cString & | strStructName | ) |
Returns the actual last Bytepos inclusive the last Element size.
[in] | strStructName | - name of the Struct where you want the last element |
A_UTILS_NS::cString GetLastErrorDesc | ( | ) | const |
Getter for the most recent error description.
A_UTILS_NS::cString::Empty
if there was none. eImporterError
). tImporterMsgList GetSuggestions | ( | ) | const |
Getter for the list of suggestions.
|
protectedvirtual |
Helper method to check if the element is alignable.
[in] | posBytePos | - Current byte position inside the structure |
[in] | szElementSize | - Size of the element |
true | Element is alignable |
false | Element is not alignable |
|
staticprotected |
Helper method which returns whether the left-hand-side argument compares less than the right-hand-side one (as returned by operator <) based on given DDL type information.
[in] | strLHS | String of the left-hand-side |
[in] | strRHS | String of the right-hand-side |
[in] | poType | Pointer to common type information |
true | LHS is lower than RHS |
false | LHS is not lower than RHS or type is not interpretable |
void SetAutoCorrect | ( | bool | bAutoCorrect | ) |
Setter for the auto-correction flag.
[in] | bAutoCorrect | - New value of the flag |
|
virtual |
Visitor for DDL baseunit objects.
[in] | poBaseunit | - Pointer to the baseunit object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL struct objects.
[in] | poStruct | - Pointer to the struct object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL datatype objects.
[in] | poDataType | - Pointer to the datatype object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
ERR_NOT_SUPPORTED | Data type detected which is not supported. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL element objects.
[in] | poElement | - Pointer to the element object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
Visitor for DDL enum objects.
[in] | poEnum | - Pointer to the enum object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for external DDL declaration objects.
[in] | poExtDeclaration | - Pointer to the extdeclaration object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL header objects.
[in] | poHeader | - Pointer to the header object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL prefix objects.
[in] | poPrefix | - Pointer to the prefix object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL property objects.
[in] | poProperty | - Pointer to the object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL reference unit objects.
[in] | poRefUnit | - Pointer to the refunit object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL stream objects.
[in] | poStream | - Pointer to the stream object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL stream meta type objects.
[in] | poStreamMetaType | - Pointer to the object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for DDL streamstruct objects.
[in] | poStreamStruct | - Pointer to the streamstruct object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
Visitor for DDL unit objects.
[in] | poUnit | - Pointer to the unit object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
Implements IDDLVisitor.
|
virtual |
Visitor for a whole DDL description.
[in] | poDescription | - Pointer to the description object |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
ERR_NOT_INITIALIZED | Not yet initialized |
Implements IDDLVisitor.
|
private |
The list contains all names of the base unit names.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 201 of file ddlinspector.h.
|
private |
The list contains all names of the structs.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 173 of file ddlinspector.h.
|
private |
The list contains all names of the data types.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 180 of file ddlinspector.h.
|
private |
The list contains all names of the enum.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 187 of file ddlinspector.h.
|
private |
The list contains all names of the enum values.
If the list contains two equal names, it will be set an warning in the tImporterMsgList.
Definition at line 194 of file ddlinspector.h.
|
private |
The list contains all names of the prefixes.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 215 of file ddlinspector.h.
|
private |
The list contains all names of the streams.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 208 of file ddlinspector.h.
|
private |
The list contains all names of the unit names.
If the list contains two equal names, it will be set an error in the tImporterMsgList.
Definition at line 222 of file ddlinspector.h.