ADTF
|
Representation of the header of a DDL description. More...
Public Member Functions | |
cDDLHeader () | |
Default CTOR. | |
cDDLHeader (double const fLanguageVersion, const A_UTILS_NS::cString &strAuthor, tDate const sDateCreation, tDate const sDateChange, const A_UTILS_NS::cString &strDescription, tDDLExtDeclarationVec vecExtDecls=tDDLExtDeclarationVec()) | |
CTOR. More... | |
cDDLHeader (cDDLHeader &oHeader) | |
Copy CTOR. More... | |
virtual | ~cDDLHeader () |
DTOR. | |
tResult | Accept (IDDLVisitor *poVisitor) |
Acceptance method for Visitor design-pattern. More... | |
const A_UTILS_NS::cString & | GetName () const |
Getter for the name of the representation object. More... | |
bool | IsInitialized () const |
Getter for the initialization flag. More... | |
tResult | Create (double const fLanguageVersion, const A_UTILS_NS::cString &strAuthor, tDate const sDateCreation, tDate const sDateChange, const A_UTILS_NS::cString &strDescription, tDDLExtDeclarationVec vecExtDecls=tDDLExtDeclarationVec()) |
Creation method to fill the object with data. More... | |
double | GetLanguageVersion () const |
Getter for the language version. More... | |
void | SetLanguageVersion (double const fLanguageVersion) |
Setter for the language version. More... | |
A_UTILS_NS::cString | GetAuthor () const |
Getter for the author. More... | |
void | SetAuthor (const A_UTILS_NS::cString &strAuthor) |
Setter for the author. More... | |
tDate | GetDateCreation () const |
Getter for the creation date. More... | |
void | SetDateCreation (tDate const sDateCreation) |
Setter for the creation date. More... | |
tDate | GetDateChange () const |
Getter for the change date. More... | |
void | SetDateChange (tDate const sDateChange) |
Setter for the change date. More... | |
A_UTILS_NS::cString | GetDescription () const |
Getter for the description. More... | |
void | SetDescription (const A_UTILS_NS::cString &strDescription) |
Setter for the description. | |
void | SetExtDeclarations (tDDLExtDeclarationVec vecDDLExtDeclarations) |
Setter for the external declarations. More... | |
void | AddExtDeclaration (cDDLExtDeclaration *poExtDeclaration, int nPos=-1) |
Adder for an external declaration. More... | |
tResult | RemoveExtDeclaration (const A_UTILS_NS::cString &strKey) |
Removes the external declaration with the given key. More... | |
const tDDLExtDeclarationVec & | GetExtDeclarations () const |
Getter for the external declarations. More... | |
tDDLExtDeclarationVec & | GetExtDeclarations () |
Getter for the external declarations. More... | |
![]() | |
virtual | ~cDDL () |
DTOR. | |
virtual bool | IsPredefined () const |
Getter for the predefinition flag. More... | |
virtual bool | IsOverwriteable () const |
Getter for the predefinition flag. More... | |
virtual int | GetCreationLevel () const |
Getter for the creation level. More... | |
![]() | |
virtual | ~IDDL () |
Virtual DTOR. | |
Static Public Member Functions | |
static tDate | DateFromString (const A_UTILS_NS::cString &strDate) |
Helper method to extract a date out of a string. More... | |
![]() | |
template<typename T > | |
static T * | DeleteChild (T *pvObj) |
Functor for use with std::transform() to delete all objects where the elements of a vector point at. More... | |
template<typename T > | |
static tResult | MoveChild (T *pvObj, const int nFrom, const int nTo) |
Method moves element within the list. More... | |
template<typename T > | |
static T * | Clone (T *pvObj) |
Functor for use with std::transform() to clone the objects where the elements of a vector point at. More... | |
template<typename T > | |
static T * | Ref (T *pvObj) |
Functor for use with std::transform() to ref the objects where the elements of a vector point at, this is for the Always_there. More... | |
static bool | IsEqual (IDDL *poLHS, IDDL *poRHS) |
Predicate to compare 2 DDL representation objects (for use with std::unique() ). More... | |
static bool | IsSorted (IDDL *poLHS, IDDL *poRHS) |
Sort predicate to compare to 2 DDL representation objects (for use with std::sort() ). More... | |
Private Attributes | |
double | m_fLanguageVersion |
A_UTILS_NS::cString | m_strAuthor |
tDate | m_sDateCreation |
tDate | m_sDateChange |
A_UTILS_NS::cString | m_strDescription |
tDDLExtDeclarationVec | m_vecDDLExtDeclarations |
bool | m_bInitFlag |
Additional Inherited Members | |
![]() | |
enum | tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 } |
Flags for Merging. | |
Representation of the header of a DDL description.
Definition at line 27 of file ddlheader.h.
cDDLHeader | ( | double const | fLanguageVersion, |
const A_UTILS_NS::cString & | strAuthor, | ||
tDate const | sDateCreation, | ||
tDate const | sDateChange, | ||
const A_UTILS_NS::cString & | strDescription, | ||
tDDLExtDeclarationVec | vecExtDecls = tDDLExtDeclarationVec() |
||
) |
CTOR.
[in] | fLanguageVersion | - Version number of the file where this description is based on |
[in] | strAuthor | - Author |
[in] | sDateCreation | - Creation date of file |
[in] | sDateChange | - Date of last changes |
[in] | strDescription | - Short description of the file |
[in] | vecExtDecls | - Vector of external declarations (optional) |
cDDLHeader | ( | cDDLHeader & | oHeader | ) |
Copy CTOR.
[in] | oHeader | - Reference to header object that should be copied |
|
virtual |
Acceptance method for Visitor design-pattern.
[in] | poVisitor | - Pointer to Visitor instance |
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
ERR_NOT_INITIALIZED | The object was not or not correctly initialized |
Implements IDDL.
void AddExtDeclaration | ( | cDDLExtDeclaration * | poExtDeclaration, |
int | nPos = -1 |
||
) |
Adder for an external declaration.
[in] | poExtDeclaration | - Pointer to the external declaration |
[in] | nPos | - Position to add the external declaration |
tResult Create | ( | double const | fLanguageVersion, |
const A_UTILS_NS::cString & | strAuthor, | ||
tDate const | sDateCreation, | ||
tDate const | sDateChange, | ||
const A_UTILS_NS::cString & | strDescription, | ||
tDDLExtDeclarationVec | vecExtDecls = tDDLExtDeclarationVec() |
||
) |
Creation method to fill the object with data.
[in] | fLanguageVersion | - Version number of the file where this description is based on |
[in] | strAuthor | - Author |
[in] | sDateCreation | - Creation date of file |
[in] | sDateChange | - Date of last changes |
[in] | strDescription | - Short description of the file |
[in] | vecExtDecls | - Vector of external declarations (optional) |
|
static |
Helper method to extract a date out of a string.
Following date formats are supported (complying with DDL spec):
[in] | strDate | - String containing the date |
A_UTILS_NS::cString GetAuthor | ( | ) | const |
Getter for the author.
tDate GetDateChange | ( | ) | const |
Getter for the change date.
tDate GetDateCreation | ( | ) | const |
Getter for the creation date.
A_UTILS_NS::cString GetDescription | ( | ) | const |
Getter for the description.
tDDLExtDeclarationVec& GetExtDeclarations | ( | ) |
Getter for the external declarations.
const tDDLExtDeclarationVec& GetExtDeclarations | ( | ) | const |
Getter for the external declarations.
double GetLanguageVersion | ( | ) | const |
Getter for the language version.
|
virtual |
|
virtual |
Getter for the initialization flag.
true | The object was initialized correctly |
false | The object was not or not correctly initialized |
Reimplemented from cDDL.
tResult RemoveExtDeclaration | ( | const A_UTILS_NS::cString & | strKey | ) |
Removes the external declaration with the given key.
[in] | strKey | - Key of the external declaration which should be removed |
ERR_NOT_FOUND | The specified key was not found |
void SetAuthor | ( | const A_UTILS_NS::cString & | strAuthor | ) |
Setter for the author.
[in] | strAuthor | - Author |
void SetDateChange | ( | tDate const | sDateChange | ) |
Setter for the change date.
[in] | sDateChange | - Change date to set |
void SetDateCreation | ( | tDate const | sDateCreation | ) |
Setter for the creation date.
[in] | sDateCreation | - Creation date to set |
void SetExtDeclarations | ( | tDDLExtDeclarationVec | vecDDLExtDeclarations | ) |
Setter for the external declarations.
[in] | vecDDLExtDeclarations | - Vector of external declarations |
void SetLanguageVersion | ( | double const | fLanguageVersion | ) |
Setter for the language version.
[in] | fLanguageVersion | - the language version |