ADTF  3.18.2
cDDLHeader

Representation of the header of a DDL description. More...

Inheritance diagram for cDDLHeader:
[legend]

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::cStringGetName () 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 tDDLExtDeclarationVecGetExtDeclarations () const
 Getter for the external declarations. More...
 
tDDLExtDeclarationVecGetExtDeclarations ()
 Getter for the external declarations. More...
 
- Public Member Functions inherited from cDDL
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...
 
- Public Member Functions inherited from IDDL
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...
 
- Static Public Member Functions inherited from cDDL
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

- Public Types inherited from IDDL
enum  tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 }
 Flags for Merging.
 

Detailed Description

Representation of the header of a DDL description.

Definition at line 27 of file ddlheader.h.

Constructor & Destructor Documentation

◆ cDDLHeader() [1/2]

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.

Parameters
[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() [2/2]

cDDLHeader ( cDDLHeader oHeader)

Copy CTOR.

Parameters
[in]oHeader- Reference to header object that should be copied

Member Function Documentation

◆ Accept()

tResult Accept ( IDDLVisitor poVisitor)
virtual

Acceptance method for Visitor design-pattern.

Parameters
[in]poVisitor- Pointer to Visitor instance
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.
ERR_NOT_INITIALIZEDThe object was not or not correctly initialized

Implements IDDL.

◆ AddExtDeclaration()

void AddExtDeclaration ( cDDLExtDeclaration poExtDeclaration,
int  nPos = -1 
)

Adder for an external declaration.

Parameters
[in]poExtDeclaration- Pointer to the external declaration
[in]nPos- Position to add the external declaration
Returns
void

◆ Create()

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.

Parameters
[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)
Returns
Standard result.

◆ DateFromString()

static tDate DateFromString ( const A_UTILS_NS::cString strDate)
static

Helper method to extract a date out of a string.

Following date formats are supported (complying with DDL spec):

  • yyyymmdd
  • dd-mm-yyyy
  • yyyy-mm-dd
  • dd.mm.yyyy
Parameters
[in]strDate- String containing the date
Returns
the date structure

◆ GetAuthor()

A_UTILS_NS::cString GetAuthor ( ) const

Getter for the author.

Returns
the author

◆ GetDateChange()

tDate GetDateChange ( ) const

Getter for the change date.

Returns
the change date

◆ GetDateCreation()

tDate GetDateCreation ( ) const

Getter for the creation date.

Returns
the creation date

◆ GetDescription()

A_UTILS_NS::cString GetDescription ( ) const

Getter for the description.

Returns
the description

◆ GetExtDeclarations() [1/2]

tDDLExtDeclarationVec& GetExtDeclarations ( )

Getter for the external declarations.

Returns
the external declarations

◆ GetExtDeclarations() [2/2]

const tDDLExtDeclarationVec& GetExtDeclarations ( ) const

Getter for the external declarations.

Returns
the external declarations

◆ GetLanguageVersion()

double GetLanguageVersion ( ) const

Getter for the language version.

Returns
the language version

◆ GetName()

const A_UTILS_NS::cString& GetName ( ) const
virtual

Getter for the name of the representation object.

Returns
the name

Implements IDDL.

◆ IsInitialized()

bool IsInitialized ( ) const
virtual

Getter for the initialization flag.

Return values
trueThe object was initialized correctly
falseThe object was not or not correctly initialized

Reimplemented from cDDL.

◆ RemoveExtDeclaration()

tResult RemoveExtDeclaration ( const A_UTILS_NS::cString strKey)

Removes the external declaration with the given key.

Parameters
[in]strKey- Key of the external declaration which should be removed
Return values
ERR_NOT_FOUNDThe specified key was not found

◆ SetAuthor()

void SetAuthor ( const A_UTILS_NS::cString strAuthor)

Setter for the author.

Parameters
[in]strAuthor- Author
Returns
void

◆ SetDateChange()

void SetDateChange ( tDate const  sDateChange)

Setter for the change date.

Parameters
[in]sDateChange- Change date to set
Returns
void

◆ SetDateCreation()

void SetDateCreation ( tDate const  sDateCreation)

Setter for the creation date.

Parameters
[in]sDateCreation- Creation date to set
Returns
void

◆ SetExtDeclarations()

void SetExtDeclarations ( tDDLExtDeclarationVec  vecDDLExtDeclarations)

Setter for the external declarations.

Parameters
[in]vecDDLExtDeclarations- Vector of external declarations
Returns
void

◆ SetLanguageVersion()

void SetLanguageVersion ( double const  fLanguageVersion)

Setter for the language version.

Parameters
[in]fLanguageVersion- the language version
Returns
void