ADTF
ArraySize

Sinc DDL 2.0 it is possible to define arraysize with a string that indicates a dynamic array. More...

Public Member Functions

 ArraySize ()=default
 default CTOR.
 
 ArraySize (size_t array_size)
 CTOR. More...
 
ArraySizeoperator= (size_t array_size)
 assignment operator More...
 
 ArraySize (const std::string &array_size_element_name)
 CTOR. More...
 
ArraySizeoperator= (const std::string &array_size_element_name)
 assignment operator More...
 
void setArraySizeValue (size_t array_size)
 set the array size More...
 
size_t getArraySizeValue () const
 get the array size
 
void setArraySizeElementName (const std::string &array_size_element_name)
 sets the dynamic array size More...
 
const std::string & getArraySizeElementName () const
 gets the dynamic array size More...
 
bool isDynamicArraySize () const
 indicates if this is a dynamic erray size.
 
bool operator== (const ArraySize &other) const
 compares the Array size with the other More...
 
bool operator!= (const ArraySize &other) const
 compares the Array size with the other More...
 

Private Attributes

size_t _array_size = {1}
 
std::string _array_size_element_name = {}
 

Detailed Description

Sinc DDL 2.0 it is possible to define arraysize with a string that indicates a dynamic array.

The string it self is a elementname of the containing struct type.

Definition at line 378 of file dd_common_types.h.

Constructor & Destructor Documentation

◆ ArraySize() [1/2]

ArraySize ( size_t  array_size)

CTOR.

Parameters
array_sizesets the array size

◆ ArraySize() [2/2]

ArraySize ( const std::string &  array_size_element_name)

CTOR.

Parameters
array_size_element_namesets the dynamic array size elment name

Member Function Documentation

◆ getArraySizeElementName()

const std::string& getArraySizeElementName ( ) const

gets the dynamic array size

Returns
std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ operator!=()

bool operator!= ( const ArraySize other) const

compares the Array size with the other

Parameters
[other]the other array size
Return values
falseif they are equal
trueif they are not equal

◆ operator=() [1/2]

ArraySize& operator= ( const std::string &  array_size_element_name)

assignment operator

Parameters
array_size_element_namesets the dynamic array size elment name
Returns
ArraySize&

◆ operator=() [2/2]

ArraySize& operator= ( size_t  array_size)

assignment operator

Parameters
array_sizesets the array size
Returns
ArraySize&

◆ operator==()

bool operator== ( const ArraySize other) const

compares the Array size with the other

Parameters
[other]the other array size
Return values
trueif they are equal
falseif they are not equal

◆ setArraySizeElementName()

void setArraySizeElementName ( const std::string &  array_size_element_name)

sets the dynamic array size

Parameters
array_size_element_namesets the dynamic array size elment name

◆ setArraySizeValue()

void setArraySizeValue ( size_t  array_size)

set the array size

Parameters
array_sizesets the array size