ADTF  3.18.2
cDDLDataType

Representation for a (simple) data type inside a DDL description. More...

Inheritance diagram for cDDLDataType:
[legend]

Public Member Functions

 cDDLDataType ()
 Default CTOR.
 
 cDDLDataType (const A_UTILS_NS::cString &strName, unsigned int const uiSize, IDDLUnit *poUnit=NULL, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, cDDLAlignment::tAlignment const eAlignment=cDDLAlignment::e1, unsigned int const uiArraysize=1, int const nCreationLevel=1, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinVal=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxVal=A_UTILS_NS::cString::Empty)
 CTOR. More...
 
 cDDLDataType (cDDLDataType &oDataType)
 Copy CTOR. More...
 
virtual ~cDDLDataType ()
 DTOR.
 
tResult Accept (IDDLVisitor *poVisitor)
 Acceptance method for Visitor design-pattern. More...
 
bool IsPredefined () const
 Getter for the predefinition flag. More...
 
bool IsOverwriteable () const
 Getter for the predefinition flag. More...
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name of the representation object. More...
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name of the data type. More...
 
int GetCreationLevel () const
 Getter for the creation level. More...
 
bool IsInitialized () const
 Getter for the initialization flag. More...
 
tResult Create (const A_UTILS_NS::cString &strName, unsigned int const uiNumBits, IDDLUnit *poUnit, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, cDDLAlignment::tAlignment const eAlignment=cDDLAlignment::e1, unsigned int const uiArraysize=1, int const nCreationLevel=1, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinVal=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxVal=A_UTILS_NS::cString::Empty)
 Creation method to fill the object with data. More...
 
void SetDescription (const A_UTILS_NS::cString &strDescription)
 Setter for the description. More...
 
A_UTILS_NS::cString GetDescription () const
 Getter for the description. More...
 
void SetArraysize (unsigned int const uiArraysize)
 Setter for the array size. More...
 
unsigned int GetArraysize () const
 Getter for the array size. More...
 
void SetUnit (IDDLUnit *poUnit)
 Setter for the unit. More...
 
A_UTILS_NS::cString GetUnit () const
 Getter for the unit name. More...
 
const IDDLUnitGetUnitObject () const
 Getter for the unit object. More...
 
IDDLUnitGetUnitObject ()
 Getter for the unit object. More...
 
void SetAlignment (cDDLAlignment::tAlignment const eAlignment)
 Setter for the alignment. More...
 
cDDLAlignment::tAlignment GetAlignment () const
 Getter for the alignment of the primitive data type. More...
 
unsigned int GetNumBits () const
 Getter for the size of the primitive data type. More...
 
void SetNumBits (unsigned int const uiNumBits)
 Setter for the size of the primitive data type. More...
 
A_UTILS_NS::cString GetArraySizeSource () const
 Getter for the array size source. More...
 
void SetArraySizeSource (const A_UTILS_NS::cString &strArraySizeSource)
 Setter for the array size source. More...
 
bool IsDynamic () const
 Checks if element is dynamic. More...
 
double GetDDLVersion () const
 Getter for the DDL version. More...
 
tResult SetDDLVersion (double const fLanguageVersion)
 Setter for the DDL version. More...
 
void SetMinValidity (bool const bMinValid)
 Setter for the validity flag for the minimum value. More...
 
bool IsMinValid () const
 Getter for the validity flag for the minimum value. More...
 
const A_UTILS_NS::cStringGetMinValue () const
 Getter for the minimum value of the data type. More...
 
tResult SetMinValue (const A_UTILS_NS::cString &strMinVal)
 Setter for the minimum value of the data type. More...
 
void SetMaxValidity (bool const bMaxValid)
 Setter for the validity flag for the maximum value. More...
 
bool IsMaxValid () const
 Getter for the validity flag for the maximum value. More...
 
const A_UTILS_NS::cStringGetMaxValue () const
 Getter for the maximum value of the data type. More...
 
tResult SetMaxValue (const A_UTILS_NS::cString &strMaxVal)
 Setter for the maximum value of the data type. More...
 
- Public Member Functions inherited from IDDLDataType
virtual ~IDDLDataType ()
 Virtual DTOR.
 
- Public Member Functions inherited from IDDL
virtual ~IDDL ()
 Virtual DTOR.
 

Private Member Functions

void UpdateSizesAndPositions ()
 

Private Attributes

double m_fLanguageVersion
 The DDL Version this structure was created in.
 
A_UTILS_NS::cString m_strName
 
unsigned int m_uiNumBits
 
size_t m_szByteSize
 
size_t m_szAlignedSize
 
IDDLUnitm_poUnit
 
A_UTILS_NS::cString m_strDescription
 
unsigned int m_uiArraysize
 
A_UTILS_NS::cString m_strArraySizeSource
 
cDDLAlignment::tAlignment m_eAlignment
 
bool m_bInitFlag
 
int m_nLevel
 
bool m_bMinValid
 
A_UTILS_NS::cString m_strMinVal
 
bool m_bMaxValid
 
A_UTILS_NS::cString m_strMaxVal
 
bool m_bDefaultValid
 
A_UTILS_NS::cString m_strDefaultVal
 

Additional Inherited Members

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

Detailed Description

Representation for a (simple) data type inside a DDL description.

Definition at line 18 of file ddldatatype.h.

Constructor & Destructor Documentation

◆ cDDLDataType() [1/2]

cDDLDataType ( const A_UTILS_NS::cString strName,
unsigned int const  uiSize,
IDDLUnit poUnit = NULL,
const A_UTILS_NS::cString strDescription = A_UTILS_NS::cString::Empty,
cDDLAlignment::tAlignment const  eAlignment = cDDLAlignment::e1,
unsigned int const  uiArraysize = 1,
int const  nCreationLevel = 1,
const A_UTILS_NS::cString strArraySizeSource = A_UTILS_NS::cString::Empty,
bool const  bMinValid = false,
const A_UTILS_NS::cString strMinVal = A_UTILS_NS::cString::Empty,
bool const  bMaxValid = false,
const A_UTILS_NS::cString strMaxVal = A_UTILS_NS::cString::Empty 
)

CTOR.

Parameters
[in]strName- Name of the primitive data type
[in]uiSize- Size in bit
[in]poUnit- Pointer to the unit of the data type (optional)
[in]strDescription- Description of the primitive data type (optional)
[in]eAlignment- Alignment of the primitive data type (optional)
[in]uiArraysize- Array size of the primitive data type (optional)
[in]nCreationLevel- Level at creation time (optional)
[in]strArraySizeSource- Name of the element that represents the arrays size (optional)
[in]bMinValid- Validity flag for the minimum value (optional)
[in]strMinVal- Minimum value of the data type (optional)
[in]bMaxValid- Validity flag for the maximum value (optional)
[in]strMaxVal- Maximum value of the data type (optional)

◆ cDDLDataType() [2/2]

cDDLDataType ( cDDLDataType oDataType)

Copy CTOR.

Parameters
[in]oDataType- Reference to data type object to copy

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.

◆ Create()

tResult Create ( const A_UTILS_NS::cString strName,
unsigned int const  uiNumBits,
IDDLUnit poUnit,
const A_UTILS_NS::cString strDescription = A_UTILS_NS::cString::Empty,
cDDLAlignment::tAlignment const  eAlignment = cDDLAlignment::e1,
unsigned int const  uiArraysize = 1,
int const  nCreationLevel = 1,
const A_UTILS_NS::cString strArraySizeSource = A_UTILS_NS::cString::Empty,
bool const  bMinValid = false,
const A_UTILS_NS::cString strMinVal = A_UTILS_NS::cString::Empty,
bool const  bMaxValid = false,
const A_UTILS_NS::cString strMaxVal = A_UTILS_NS::cString::Empty 
)

Creation method to fill the object with data.

Parameters
[in]strName- Name of the primitive data type
[in]uiNumBits- Size in bit
[in]poUnit- Pointer to the unit of the data type
[in]strDescription- Description of the primitive data type (optional)
[in]eAlignment- Alignment of the primitive data type (optional)
[in]uiArraysize- Array size of the primitive data type (optional)
[in]nCreationLevel- Level at creation time (optional)
[in]strArraySizeSource- Name of the element that represents the arrays size
[in]bMinValid- Validity flag for the minimum value (optional)
[in]strMinVal- Minimum value of the data type (optional)
[in]bMaxValid- Validity flag for the maximum value (optional)
[in]strMaxVal- Maximum value of the data type (optional)
Return values
ERR_POINTERNull-pointer committed

◆ GetAlignment()

cDDLAlignment::tAlignment GetAlignment ( ) const

Getter for the alignment of the primitive data type.

Returns
the alignment

◆ GetArraysize()

unsigned int GetArraysize ( ) const

Getter for the array size.

Returns
the array size

◆ GetArraySizeSource()

A_UTILS_NS::cString GetArraySizeSource ( ) const

Getter for the array size source.

Returns
the array size source

◆ GetCreationLevel()

int GetCreationLevel ( ) const
virtual

Getter for the creation level.

Returns
the level at creation time of this representation object

Implements IDDL.

◆ GetDDLVersion()

double GetDDLVersion ( ) const

Getter for the DDL version.

Returns
the DDL version

◆ GetDescription()

A_UTILS_NS::cString GetDescription ( ) const

Getter for the description.

Returns
the description

◆ GetMaxValue()

const A_UTILS_NS::cString& GetMaxValue ( ) const

Getter for the maximum value of the data type.

Returns
the maximum value

◆ GetMinValue()

const A_UTILS_NS::cString& GetMinValue ( ) const

Getter for the minimum value of the data type.

Returns
the minimum value

◆ GetName()

const A_UTILS_NS::cString& GetName ( ) const
virtual

Getter for the name of the representation object.

Returns
the name

Implements IDDL.

◆ GetNumBits()

unsigned int GetNumBits ( ) const

Getter for the size of the primitive data type.

Returns
the size in [bit]

◆ GetUnit()

A_UTILS_NS::cString GetUnit ( ) const

Getter for the unit name.

Returns
name of the referenced unit (A_UTILS_NS::cString::Empty if there is none)

◆ GetUnitObject() [1/2]

IDDLUnit* GetUnitObject ( )

Getter for the unit object.

Returns
pointer to the unit object (NULL if there is none)

◆ GetUnitObject() [2/2]

const IDDLUnit* GetUnitObject ( ) const

Getter for the unit object.

Returns
pointer to the unit object (NULL if there is none)

◆ IsDynamic()

bool IsDynamic ( ) const

Checks if element is dynamic.

Returns
true if it is a dynamic array

◆ 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

Implements IDDL.

◆ IsMaxValid()

bool IsMaxValid ( ) const

Getter for the validity flag for the maximum value.

Returns
the validity flag for the maximum value

◆ IsMinValid()

bool IsMinValid ( ) const

Getter for the validity flag for the minimum value.

Returns
the validity flag for the minimum value

◆ IsOverwriteable()

bool IsOverwriteable ( ) const
virtual

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

Implements IDDL.

◆ IsPredefined()

bool IsPredefined ( ) const
virtual

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

Implements IDDL.

◆ SetAlignment()

void SetAlignment ( cDDLAlignment::tAlignment const  eAlignment)

Setter for the alignment.

Parameters
[in]eAlignment- Alignment value
Returns
void

◆ SetArraysize()

void SetArraysize ( unsigned int const  uiArraysize)

Setter for the array size.

Parameters
[in]uiArraysize- Array size of the data type
= 1 -> primitve presentation
> 1 -> array with the amount of elements
Returns
void

◆ SetArraySizeSource()

void SetArraySizeSource ( const A_UTILS_NS::cString strArraySizeSource)

Setter for the array size source.

Parameters
[in]strArraySizeSource- the array size source element
Returns
void

◆ SetDDLVersion()

tResult SetDDLVersion ( double const  fLanguageVersion)

Setter for the DDL version.

Parameters
fLanguageVersionthe DDL version to set
Returns
Standard result code.
Return values
ERR_NOERROREverything is fine.

◆ SetDescription()

void SetDescription ( const A_UTILS_NS::cString strDescription)

Setter for the description.

Parameters
[in]strDescription- Description of the primitive data type
Returns
void

◆ SetMaxValidity()

void SetMaxValidity ( bool const  bMaxValid)

Setter for the validity flag for the maximum value.

Parameters
[in]bMaxValidValidity flag for the maximum value.
Returns
void

◆ SetMaxValue()

tResult SetMaxValue ( const A_UTILS_NS::cString strMaxVal)

Setter for the maximum value of the data type.

Parameters
[in]strMaxValThe new maximum value
Return values
ERR_NOERROREverything went fine.

◆ SetMinValidity()

void SetMinValidity ( bool const  bMinValid)

Setter for the validity flag for the minimum value.

Parameters
[in]bMinValidValidity flag for the minimum value.
Returns
void

◆ SetMinValue()

tResult SetMinValue ( const A_UTILS_NS::cString strMinVal)

Setter for the minimum value of the data type.

Parameters
[in]strMinValThe new minimum value
Return values
ERR_NOERROREverything went fine.

◆ SetName()

void SetName ( const A_UTILS_NS::cString strName)

Setter for the name of the data type.

Parameters
[in]strNameName of the data type
Returns
void

◆ SetNumBits()

void SetNumBits ( unsigned int const  uiNumBits)

Setter for the size of the primitive data type.

Parameters
[in]uiNumBits- Size in [bit]
Returns
void

◆ SetUnit()

void SetUnit ( IDDLUnit poUnit)

Setter for the unit.

Parameters
[in]poUnit- Pointer to the unit object of the data type
Returns
void