ADTF  3.18.2
cDDLElement

Representation of an element inside a struct in DDL a description. More...

Public Member Functions

 cDDLElement ()
 Default CTOR.
 
 cDDLElement (IDDLDataType *poType, const A_UTILS_NS::cString &strName, unsigned int const uiBytepos, unsigned int const uiArraysize, cDDLByteorder::tByteorder const eByteorder, cDDLAlignment::tAlignment const eAlignment, IDDLUnit *poUnit=NULL, unsigned int const uiBitpos=0, unsigned int const uiNumBits=0, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strComment=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strValue=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinValue=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxValue=A_UTILS_NS::cString::Empty, bool const bDefaultValid=false, const A_UTILS_NS::cString &strDefaultValue=A_UTILS_NS::cString::Empty, bool const bScaleValid=false, const A_UTILS_NS::cString &strScaleValue=A_UTILS_NS::cString::Empty, bool const bOffsetValid=false, const A_UTILS_NS::cString &strOffsetValue=A_UTILS_NS::cString::Empty)
 CTOR. More...
 
 cDDLElement (cDDLElement &oElem)
 Copy CTOR. More...
 
virtual ~cDDLElement ()
 DTOR.
 
tResult Accept (IDDLVisitor *poVisitor)
 Acceptance method for Visitor design-pattern. More...
 
bool IsInitialized () const
 Getter for the initialization flag. More...
 
bool IsPredefined () const
 Getter for the predefinition flag. More...
 
int GetCreationLevel () const
 Getter for the creation level. More...
 
tResult Create (IDDLDataType *poType, const A_UTILS_NS::cString &strName, unsigned int const uiBytepos, unsigned int const uiArraysize, cDDLByteorder::tByteorder const eByteorder, cDDLAlignment::tAlignment const eAlignment, IDDLUnit *poUnit, unsigned int const uiBitpos=0, unsigned int const uiNumBits=0, const A_UTILS_NS::cString &strDescription=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strComment=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strArraySizeSource=A_UTILS_NS::cString::Empty, const A_UTILS_NS::cString &strValue=A_UTILS_NS::cString::Empty, bool const bMinValid=false, const A_UTILS_NS::cString &strMinValue=A_UTILS_NS::cString::Empty, bool const bMaxValid=false, const A_UTILS_NS::cString &strMaxValue=A_UTILS_NS::cString::Empty, bool const bDefaultValid=false, const A_UTILS_NS::cString &strDefaultValue=A_UTILS_NS::cString::Empty, bool const bScaleValid=false, const A_UTILS_NS::cString &strScaleValue=A_UTILS_NS::cString::Empty, bool const bOffsetValid=false, const A_UTILS_NS::cString &strOffsetValue=A_UTILS_NS::cString::Empty)
 Creation method to fill the obejct with data. More...
 
const A_UTILS_NS::cStringGetType () const
 Getter for the data-type name. More...
 
void SetType (IDDLDataType *const pType)
 Setter for the type of the element. More...
 
IDDLDataTypeGetTypeObject () const
 Getter for the data-type object. More...
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name. More...
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name of the element. More...
 
unsigned int GetBytepos () const
 Getter for the b byte position. More...
 
void SetBytepos (unsigned int const uiBytePos)
 Setter for the byte position of the element. More...
 
unsigned int GetArraysize () const
 Getter for the array size. More...
 
void SetArraysize (unsigned int const uiArraySize)
 Setter for the array size of the element. More...
 
cDDLByteorder::tByteorder GetByteorder () const
 Getter for the byteorder. More...
 
void SetByteorder (cDDLByteorder::tByteorder const eByteOrder)
 Setter for the byte order of the element. More...
 
cDDLAlignment::tAlignment GetAlignment () const
 Getter for the alignment. More...
 
void SetAlignment (cDDLAlignment::tAlignment const eAlign)
 Setter for the alignment of the element. More...
 
void SetBitpos (unsigned int const uiBitpos)
 Setter for the bit position. More...
 
unsigned int GetBitpos () const
 Getter for the bit position. More...
 
void SetNumBits (unsigned int const uiNumBits)
 Setter for the amount of bits. More...
 
unsigned int GetNumBits () const
 Getter for the amount of bits. More...
 
void SetDescription (const A_UTILS_NS::cString &strDescription)
 Setter for the description. More...
 
const A_UTILS_NS::cStringGetDescription () const
 Getter for the description. More...
 
void SetUnit (IDDLUnit *poUnit)
 Setter for the unit reference. More...
 
const A_UTILS_NS::cStringGetUnit () const
 Getter for the unit name. More...
 
IDDLUnitGetUnitObject () const
 Getter for the unit object. More...
 
void SetComment (const A_UTILS_NS::cString &strComment)
 Setter for the comment. More...
 
const A_UTILS_NS::cStringGetComment () const
 Getter for the comment. More...
 
const A_UTILS_NS::cStringGetArraySizeSource () const
 Getter for the array size source. More...
 
void SetArraySizeSource (const A_UTILS_NS::cString &strArraySizeSource)
 Setter for the array size source. More...
 
const A_UTILS_NS::cStringGetConstantValue () const
 Getter for the value of a constant element. More...
 
void SetConstantValue (const A_UTILS_NS::cString &strConstantValue)
 Setter value of a constant element. More...
 
bool IsDynamic () const
 Checks if element is dynamic. 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...
 
void SetDefaultValidity (bool const bDefaultValid)
 Setter for the validity flag for the default value. More...
 
bool IsDefaultValid () const
 Getter for the validity flag for the default value. More...
 
const A_UTILS_NS::cStringGetDefaultValue () const
 Getter for the default value. More...
 
tResult SetDefaultValue (const A_UTILS_NS::cString &strDefaultVal)
 Setter for the default value. More...
 
void SetScaleValidity (bool const bScaleValid)
 Setter for the validity flag for the scaling value. More...
 
bool IsScaleValid () const
 Getter for the validity flag for the scaling value. More...
 
const A_UTILS_NS::cStringGetScaleValue () const
 Getter for the scaling value. More...
 
tResult SetScaleValue (const A_UTILS_NS::cString &strScaleValue)
 Setter for the scaling value. More...
 
void SetOffsetValidity (bool const bOffsetValid)
 Setter for the validity flag for the offset value. More...
 
bool IsOffsetValid () const
 Getter for the validity flag for the offset value. More...
 
const A_UTILS_NS::cStringGetOffsetValue () const
 Getter for the offset value. More...
 
tResult SetOffsetValue (const A_UTILS_NS::cString &strOffsetValue)
 Setter for the offset value. More...
 

Private Attributes

IDDLDataTypem_poType
 
A_UTILS_NS::cString m_strName
 
unsigned int m_uiBytepos
 
unsigned int m_uiBitpos
 
unsigned int m_uiNumBits
 
A_UTILS_NS::cString m_strDescription
 
unsigned int m_uiArraysize
 
A_UTILS_NS::cString m_strArraySizeSource
 
A_UTILS_NS::cString m_strConstantValue
 
IDDLUnitm_poUnit
 
cDDLByteorder::tByteorder m_eByteorder
 
cDDLAlignment::tAlignment m_eAlignment
 
A_UTILS_NS::cString m_strComment
 
bool m_bInitFlag
 
bool m_bMinValid
 
A_UTILS_NS::cString m_strMinValue
 
bool m_bMaxValid
 
A_UTILS_NS::cString m_strMaxValue
 
bool m_bDefaultValid
 
A_UTILS_NS::cString m_strDefaultValue
 
bool m_bScaleValid
 
A_UTILS_NS::cString m_strScaleValue
 
bool m_bOffsetValid
 
A_UTILS_NS::cString m_strOffsetValue
 

Detailed Description

Representation of an element inside a struct in DDL a description.

Definition at line 18 of file ddlelement.h.

Constructor & Destructor Documentation

◆ cDDLElement() [1/2]

cDDLElement ( IDDLDataType poType,
const A_UTILS_NS::cString strName,
unsigned int const  uiBytepos,
unsigned int const  uiArraysize,
cDDLByteorder::tByteorder const  eByteorder,
cDDLAlignment::tAlignment const  eAlignment,
IDDLUnit poUnit = NULL,
unsigned int const  uiBitpos = 0,
unsigned int const  uiNumBits = 0,
const A_UTILS_NS::cString strDescription = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strComment = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strArraySizeSource = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strValue = A_UTILS_NS::cString::Empty,
bool const  bMinValid = false,
const A_UTILS_NS::cString strMinValue = A_UTILS_NS::cString::Empty,
bool const  bMaxValid = false,
const A_UTILS_NS::cString strMaxValue = A_UTILS_NS::cString::Empty,
bool const  bDefaultValid = false,
const A_UTILS_NS::cString strDefaultValue = A_UTILS_NS::cString::Empty,
bool const  bScaleValid = false,
const A_UTILS_NS::cString strScaleValue = A_UTILS_NS::cString::Empty,
bool const  bOffsetValid = false,
const A_UTILS_NS::cString strOffsetValue = A_UTILS_NS::cString::Empty 
)

CTOR.

Parameters
[in]poType- Pointer to the data-type object
[in]strName- Name of the created element
[in]uiBytepos- Byte position of the referenced data type
[in]uiArraysize- Array size of the element
[in]eByteorder- Byte order of the related data type
[in]eAlignment- Alignment of the related data type
[in]poUnit- Pointer to unit object
[in]uiBitpos- Bit position of the referenced data type (optional)
[in]uiNumBits- The amount of bits used for the representation (optional)
[in]strDescription- Description of the created data type (optional)
[in]strComment- Additional comments (optional)
[in]strArraySizeSource- The name of the source element for the size of a dynamic array (optional)
[in]strValue- The value of a constant element (optional)
[in]bMinValid- Validity flag for the minimum value (optional)
[in]strMinValue- Minimum value of the element (optional)
[in]bMaxValid- Validity flag for the maximum value (optional)
[in]strMaxValue- Maximum value of the element (optional)
[in]bDefaultValid- Validity flag for the default value (optional)
[in]strDefaultValue- Default value of the element (optional)
[in]bScaleValid- Validity flag for the scaling value (optional)
[in]strScaleValue- Scaling value of the element (optional)
[in]bOffsetValid- Validity flag for the offset value (optional)
[in]strOffsetValue- Offset value of the element (optional)

◆ cDDLElement() [2/2]

cDDLElement ( cDDLElement oElem)

Copy CTOR.

Parameters
[in]oElemInstance of cDDLElement to copy.

Member Function Documentation

◆ Accept()

tResult Accept ( IDDLVisitor poVisitor)

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

◆ Create()

tResult Create ( IDDLDataType poType,
const A_UTILS_NS::cString strName,
unsigned int const  uiBytepos,
unsigned int const  uiArraysize,
cDDLByteorder::tByteorder const  eByteorder,
cDDLAlignment::tAlignment const  eAlignment,
IDDLUnit poUnit,
unsigned int const  uiBitpos = 0,
unsigned int const  uiNumBits = 0,
const A_UTILS_NS::cString strDescription = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strComment = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strArraySizeSource = A_UTILS_NS::cString::Empty,
const A_UTILS_NS::cString strValue = A_UTILS_NS::cString::Empty,
bool const  bMinValid = false,
const A_UTILS_NS::cString strMinValue = A_UTILS_NS::cString::Empty,
bool const  bMaxValid = false,
const A_UTILS_NS::cString strMaxValue = A_UTILS_NS::cString::Empty,
bool const  bDefaultValid = false,
const A_UTILS_NS::cString strDefaultValue = A_UTILS_NS::cString::Empty,
bool const  bScaleValid = false,
const A_UTILS_NS::cString strScaleValue = A_UTILS_NS::cString::Empty,
bool const  bOffsetValid = false,
const A_UTILS_NS::cString strOffsetValue = A_UTILS_NS::cString::Empty 
)

Creation method to fill the obejct with data.

Parameters
[in]poType- Pointer to the datatype object
[in]strName- Name of the created element
[in]uiBytepos- Byte position of the referenced data type
[in]uiArraysize- Arraysize of the element
[in]eByteorder- Byteorder of the related data type
[in]eAlignment- Alignment of the related data type
[in]poUnit- Pointer to unit object
[in]uiBitpos- Bit position of the referenced data type (optional)
[in]uiNumBits- The amount of bits used for the representation (optional)
[in]strDescription- Description of the created data type (optional)
[in]strComment- Additional comments (optional)
[in]strArraySizeSource- The name of the source element for the size of a dynamic array
[in]strValue- The value of a constant element (optional)
[in]bMinValid- Validity flag for the minimum value (optional)
[in]strMinValue- Minimum value of the element (optional)
[in]bMaxValid- Validity flag for the maximum value (optional)
[in]strMaxValue- Maximum value of the element (optional)
[in]bDefaultValid- Validity flag for the default value (optional)
[in]strDefaultValue- Default value of the element (optional)
[in]bScaleValid- Validity flag for the scaling value (optional)
[in]strScaleValue- Scaling value of the element (optional)
[in]bOffsetValid- Validity flag for the offset value (optional)
[in]strOffsetValue- Offset value of the element (optional)
Return values
ERR_POINTERNull-pointer committed

◆ GetAlignment()

cDDLAlignment::tAlignment GetAlignment ( ) const

Getter for the alignment.

Returns
the alignment

◆ GetArraysize()

unsigned int GetArraysize ( ) const

Getter for the array size.

Returns
the array size

◆ GetArraySizeSource()

const A_UTILS_NS::cString& GetArraySizeSource ( ) const

Getter for the array size source.

Returns
the array size source

◆ GetBitpos()

unsigned int GetBitpos ( ) const

Getter for the bit position.

Returns
the bit position

◆ GetByteorder()

cDDLByteorder::tByteorder GetByteorder ( ) const

Getter for the byteorder.

Returns
the byteorder

◆ GetBytepos()

unsigned int GetBytepos ( ) const

Getter for the b byte position.

Returns
the byte position

◆ GetComment()

const A_UTILS_NS::cString& GetComment ( ) const

Getter for the comment.

Returns
the comment

◆ GetConstantValue()

const A_UTILS_NS::cString& GetConstantValue ( ) const

Getter for the value of a constant element.

Returns
the value of a constant element

◆ GetCreationLevel()

int GetCreationLevel ( ) const

Getter for the creation level.

Returns
the level at creation time of this representation object

◆ GetDefaultValue()

const A_UTILS_NS::cString& GetDefaultValue ( ) const

Getter for the default value.

Returns
the default value

◆ GetDescription()

const 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

Getter for the name.

Returns
the name

◆ GetNumBits()

unsigned int GetNumBits ( ) const

Getter for the amount of bits.

Returns
the amount of bits

◆ GetOffsetValue()

const A_UTILS_NS::cString& GetOffsetValue ( ) const

Getter for the offset value.

Returns
the offset value.

◆ GetScaleValue()

const A_UTILS_NS::cString& GetScaleValue ( ) const

Getter for the scaling value.

Returns
the scaling value

◆ GetType()

const A_UTILS_NS::cString& GetType ( ) const

Getter for the data-type name.

Returns
name of the data type

◆ GetTypeObject()

IDDLDataType* GetTypeObject ( ) const

Getter for the data-type object.

Returns
pointer to the data-type object

◆ GetUnit()

const A_UTILS_NS::cString& GetUnit ( ) const

Getter for the unit name.

Returns
the unit name

◆ GetUnitObject()

IDDLUnit* GetUnitObject ( ) const

Getter for the unit object.

Returns
pointer to the unit object

◆ IsDefaultValid()

bool IsDefaultValid ( ) const

Getter for the validity flag for the default value.

Returns
the validity flag for the default value

◆ IsDynamic()

bool IsDynamic ( ) const

Checks if element is dynamic.

Returns
true if it is a dynamic array

◆ IsInitialized()

bool IsInitialized ( ) const

Getter for the initialization flag.

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

◆ 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

◆ IsOffsetValid()

bool IsOffsetValid ( ) const

Getter for the validity flag for the offset value.

Returns
the validity flag for the offset value.

◆ IsPredefined()

bool IsPredefined ( ) const

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

◆ IsScaleValid()

bool IsScaleValid ( ) const

Getter for the validity flag for the scaling value.

Returns
the validity flag for the scaling value.

◆ SetAlignment()

void SetAlignment ( cDDLAlignment::tAlignment const  eAlign)

Setter for the alignment of the element.

Parameters
[in]eAlignAlignment of the element
Returns
void

◆ SetArraysize()

void SetArraysize ( unsigned int const  uiArraySize)

Setter for the array size of the element.

Parameters
[in]uiArraySizeArray size of the element
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

◆ SetBitpos()

void SetBitpos ( unsigned int const  uiBitpos)

Setter for the bit position.

Parameters
[in]uiBitpos- Bit position of the referenced data type
Returns
void

◆ SetByteorder()

void SetByteorder ( cDDLByteorder::tByteorder const  eByteOrder)

Setter for the byte order of the element.

Parameters
[in]eByteOrderByte order of the element
Returns
void

◆ SetBytepos()

void SetBytepos ( unsigned int const  uiBytePos)

Setter for the byte position of the element.

Parameters
[in]uiBytePosByte position of the element
Returns
void

◆ SetComment()

void SetComment ( const A_UTILS_NS::cString strComment)

Setter for the comment.

Parameters
[in]strComment- Additional comments
Returns
void

◆ SetConstantValue()

void SetConstantValue ( const A_UTILS_NS::cString strConstantValue)

Setter value of a constant element.

Parameters
[in]strConstantValue- constant value
Returns
void

◆ SetDefaultValidity()

void SetDefaultValidity ( bool const  bDefaultValid)

Setter for the validity flag for the default value.

Parameters
[in]bDefaultValidValidity flag for the default value
Returns
void

◆ SetDefaultValue()

tResult SetDefaultValue ( const A_UTILS_NS::cString strDefaultVal)

Setter for the default value.

Parameters
[in]strDefaultValThe new default value
Return values
ERR_NOERROREverything went fine.

◆ SetDescription()

void SetDescription ( const A_UTILS_NS::cString strDescription)

Setter for the description.

Parameters
[in]strDescription- the description
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 element.

Parameters
[in]strNameName of the element
Returns
void

◆ SetNumBits()

void SetNumBits ( unsigned int const  uiNumBits)

Setter for the amount of bits.

Parameters
[in]uiNumBits- Amount of bits used for the representation
Returns
void

◆ SetOffsetValidity()

void SetOffsetValidity ( bool const  bOffsetValid)

Setter for the validity flag for the offset value.

Parameters
[in]bOffsetValidValidity flag for the offset value
Returns
void

◆ SetOffsetValue()

tResult SetOffsetValue ( const A_UTILS_NS::cString strOffsetValue)

Setter for the offset value.

Parameters
[in]strOffsetValueThe new offset value
Return values
ERR_NOERROREverything went fine.

◆ SetScaleValidity()

void SetScaleValidity ( bool const  bScaleValid)

Setter for the validity flag for the scaling value.

Parameters
[in]bScaleValidValidity flag for the scaling value
Returns
void

◆ SetScaleValue()

tResult SetScaleValue ( const A_UTILS_NS::cString strScaleValue)

Setter for the scaling value.

Parameters
[in]strScaleValueThe new scaling value
Return values
ERR_NOERROREverything went fine.

◆ SetType()

void SetType ( IDDLDataType *const  pType)

Setter for the type of the element.

Parameters
[in]pTypePointer to the type object
Returns
void

◆ SetUnit()

void SetUnit ( IDDLUnit poUnit)

Setter for the unit reference.

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