ADTF  3.18.2
adtf_ddl::access_element Namespace Reference

Namespace for access_element functions. More...

Namespaces

 detail
 Namespace for all internally used functionality implemented.
 

Functions

template<typename T >
tResult find_index (const T &oDecoder, const A_UTILS_NS::cString &strElementName, size_t &nIndex)
 Find the index of an element by name. More...
 
template<typename T >
tResult find_struct_index (const T &oDecoder, const A_UTILS_NS::cString &strStructName, size_t &nIndex)
 Find the index of the first element of a sub-structure by name. More...
 
template<typename T >
tResult find_array_index (const T &oDecoder, const A_UTILS_NS::cString &strArrayName, size_t &nIndex)
 Find the index of the first element of an array by name. More...
 
template<typename T >
tResult find_array_end_index (const T &oDecoder, const A_UTILS_NS::cString &strArrayName, size_t &nIndex)
 Find the index of the first element after an array by name. More...
 
template<typename T >
tResult get_value (const T &oDecoder, const A_UTILS_NS::cString &strElementName, void *pValue)
 Get the value of an element by name. More...
 
template<typename T >
tResult set_value (T &oCodec, const A_UTILS_NS::cString &strElementName, const void *pValue)
 Set the value of an element by name. More...
 
template<typename T >
A_UTILS_NS::cVariant get_value (const T &oDecoder, const A_UTILS_NS::cString &strElementName)
 Get the value of an element by name. More...
 
template<typename T >
tResult set_value (T &oCodec, const A_UTILS_NS::cString &strElementName, const A_UTILS_NS::cVariant &oValue)
 Set the value of an element by name. More...
 
template<typename T >
A_UTILS_NS::cVariant get_value (const T &oDecoder, size_t nElement)
 Get the value of an element by index. More...
 
template<typename T >
const void * get_value_address (const T &oDecoder, const A_UTILS_NS::cString &strElementName)
 Get a pointer to an element by name. More...
 
template<typename T >
void * get_value_address (T &oCodec, const A_UTILS_NS::cString &strElementName)
 Get a pointer to an element by name. More...
 
template<typename Struct , typename T >
const Struct * get_struct_address (const T &oDecoder, const A_UTILS_NS::cString &strStructName)
 Get a pointer to a sub-structure by name. More...
 
template<typename Struct , typename T >
Struct * get_struct_address (T &oCodec, const A_UTILS_NS::cString &strStructName)
 Get a pointer to a sub-structure by name. More...
 
template<typename T , typename Codec >
tResult get_struct_value (const Codec &oDecoder, const A_UTILS_NS::cString &strStructName, T *pStructValue)
 Copy a sub-structure out of the structure. More...
 
template<typename T , typename Codec >
tResult set_struct_value (Codec &oCodec, const A_UTILS_NS::cString &strStructName, const T *pStructValue)
 Copy a sub-structure into the structure. More...
 
template<typename ArrayType , typename T >
const ArrayType * get_array_address (const T &oDecoder, const A_UTILS_NS::cString &strArrayName)
 Get a pointer to an array by name. More...
 
template<typename ArrayType , typename T >
ArrayType * get_array_address (T &oCodec, const A_UTILS_NS::cString &strArrayName)
 Get a pointer to an array by name. More...
 
template<typename Codec >
tResult get_array (const Codec &oDecoder, const A_UTILS_NS::cString &strArrayName, const void *&pStartAddress, size_t &nSize)
 Get information about an array. More...
 
template<typename T , typename Codec >
tResult get_array_value (const Codec &oDecoder, const A_UTILS_NS::cString &strArrayName, T *pArrayValue)
 Copy an array out of the structure. More...
 
template<typename T >
tResult reset (T &oCodec, const A_UTILS_NS::cString &strElementName)
 Set the value of the requested element to zero. More...
 
template<typename T >
A_UTILS_NS::cString get_value_as_string (const T &oDecoder, size_t nElement)
 Get the value of an element as a string, using enum value names if available. More...
 
template<typename T >
A_UTILS_NS::cString get_value_as_string (const T &oDecoder, const A_UTILS_NS::cString &strElementName)
 Get the value of an element as a string, using enum value names if available. More...
 

Detailed Description

Namespace for access_element functions.

Function Documentation

◆ find_array_end_index()

tResult adtf_ddl::access_element::find_array_end_index ( const T &  oDecoder,
const A_UTILS_NS::cString strArrayName,
size_t &  nIndex 
)

Find the index of the first element after an array by name.

Parameters
[in]oDecoderThe decoder or factory.
[in]strArrayNameThe name of the array.
[out]nIndexThe index of the found element.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 179 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References IS_FAILED, and RETURN_NOERROR.

Referenced by get_array().

◆ find_array_index()

tResult adtf_ddl::access_element::find_array_index ( const T &  oDecoder,
const A_UTILS_NS::cString strArrayName,
size_t &  nIndex 
)

Find the index of the first element of an array by name.

Parameters
[in]oDecoderThe decoder or factory.
[in]strArrayNameThe name of the array.
[out]nIndexThe index of the found element.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 166 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

Referenced by get_array(), get_array_address(), and ddl::access_element::getArrayAddress().

◆ find_index()

tResult adtf_ddl::access_element::find_index ( const T &  oDecoder,
const A_UTILS_NS::cString strElementName,
size_t &  nIndex 
)

Find the index of an element by name.

Parameters
[in]oDecoderThe decoder or factory.
[in]strElementNameThe name of the element.
[out]nIndexThe index of the found element.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 126 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References string_base< storageT >::GetPtr(), IS_OK, cStringUtil::IsEqual(), RETURN_ERROR, and RETURN_NOERROR.

Referenced by get_value(), get_value_address(), get_value_as_string(), ddl::access_element::getValueAddress(), reset(), and set_value().

◆ find_struct_index()

tResult adtf_ddl::access_element::find_struct_index ( const T &  oDecoder,
const A_UTILS_NS::cString strStructName,
size_t &  nIndex 
)

Find the index of the first element of a sub-structure by name.

Parameters
[in]oDecoderThe decoder or factory.
[in]strStructNameThe name of the sub-structure.
[out]nIndexThe index of the found element.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 153 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

Referenced by get_struct_address().

◆ get_array()

tResult adtf_ddl::access_element::get_array ( const Codec &  oDecoder,
const A_UTILS_NS::cString strArrayName,
const void *&  pStartAddress,
size_t &  nSize 
)

Get information about an array.

Parameters
[in]oDecoderThe decoder.
[in]strArrayNameThe name of the array.
[out]pStartAddressThe address of the first element of the array.
[out]nSizeThe amount of elements of the array.
Return values
ERR_NOT_FOUNDNo array with the requested name was found.

Definition at line 438 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_array_end_index(), find_array_index(), RETURN_ERROR, RETURN_IF_FAILED, and RETURN_NOERROR.

Referenced by get_array_value().

◆ get_array_address() [1/2]

const ArrayType* adtf_ddl::access_element::get_array_address ( const T &  oDecoder,
const A_UTILS_NS::cString strArrayName 
)

Get a pointer to an array by name.

Parameters
[in]oDecoderThe decoder.
[in]strArrayNameThe name of the array.
Returns
Address of the array.

Definition at line 400 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_array_index(), and IS_OK.

◆ get_array_address() [2/2]

ArrayType* adtf_ddl::access_element::get_array_address ( T &  oCodec,
const A_UTILS_NS::cString strArrayName 
)

Get a pointer to an array by name.

Parameters
[in]oCodecThe codec.
[in]strArrayNameThe name of the array.
Returns
Address of the array.

Definition at line 418 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_array_index(), and IS_OK.

◆ get_array_value()

tResult adtf_ddl::access_element::get_array_value ( const Codec &  oDecoder,
const A_UTILS_NS::cString strArrayName,
T *  pArrayValue 
)

Copy an array out of the structure.

Parameters
[in]oDecoderThe decoder.
[in]strArrayNameThe name of the array.
[out]pArrayValueThe location the array will be copied to.
Return values
ERR_NOT_FOUNDNo array with the requested name was found.

Definition at line 477 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References get_array(), cMemoryBlock::MemCopy(), RETURN_IF_FAILED, and RETURN_NOERROR.

◆ get_struct_address() [1/2]

const Struct* adtf_ddl::access_element::get_struct_address ( const T &  oDecoder,
const A_UTILS_NS::cString strStructName 
)

Get a pointer to a sub-structure by name.

Parameters
[in]oDecoderThe codec.
[in]strStructNameThe name of the structure.
Returns
Address of the sub-structure.

Definition at line 324 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_struct_index(), and IS_OK.

◆ get_struct_address() [2/2]

Struct* adtf_ddl::access_element::get_struct_address ( T &  oCodec,
const A_UTILS_NS::cString strStructName 
)

Get a pointer to a sub-structure by name.

Parameters
[in]oCodecThe codec.
[in]strStructNameThe name of the structure.
Returns
Address of the sub-structure.

Definition at line 342 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_struct_index(), and IS_OK.

◆ get_struct_value()

tResult adtf_ddl::access_element::get_struct_value ( const Codec &  oDecoder,
const A_UTILS_NS::cString strStructName,
T *  pStructValue 
)

Copy a sub-structure out of the structure.

Parameters
[in]oDecoderThe decoder.
[in]strStructNameThe name of the structure.
[out]pStructValueThe location the sub-structure will be copied to.
Return values
ERR_NOT_FOUNDNo structure with the requested name was found.

Definition at line 361 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References cMemoryBlock::MemCopy(), RETURN_ERROR, and RETURN_NOERROR.

◆ get_value() [1/3]

A_UTILS_NS::cVariant adtf_ddl::access_element::get_value ( const T &  oDecoder,
const A_UTILS_NS::cString strElementName 
)

Get the value of an element by name.

Parameters
[in]oDecoderThe decoder.
[in]strElementNameThe name of the element.
Return values
Thevalue of the element.

Definition at line 237 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and IS_OK.

◆ get_value() [2/3]

tResult adtf_ddl::access_element::get_value ( const T &  oDecoder,
const A_UTILS_NS::cString strElementName,
void *  pValue 
)

Get the value of an element by name.

Parameters
[in]oDecoderThe decoder.
[in]strElementNameThe name of the element.
[out]pValueThe location where the value should be copied to.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 208 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and RETURN_IF_FAILED.

◆ get_value() [3/3]

A_UTILS_NS::cVariant adtf_ddl::access_element::get_value ( const T &  oDecoder,
size_t  nElement 
)

Get the value of an element by index.

Parameters
[in]oDecoderThe decoder.
[in]nElementThe index of the element.
Return values
Thevalue of the element.

Definition at line 270 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References IS_OK.

◆ get_value_address() [1/2]

const void* adtf_ddl::access_element::get_value_address ( const T &  oDecoder,
const A_UTILS_NS::cString strElementName 
)

Get a pointer to an element by name.

Parameters
[in]oDecoderThe decoder.
[in]strElementNameThe name of the element.
Returns
Address of the element.

Definition at line 288 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and IS_OK.

◆ get_value_address() [2/2]

void* adtf_ddl::access_element::get_value_address ( T &  oCodec,
const A_UTILS_NS::cString strElementName 
)

Get a pointer to an element by name.

Parameters
[in]oCodecThe codec.
[in]strElementNameThe name of the element.
Returns
Address of the element.

Definition at line 306 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and IS_OK.

◆ get_value_as_string() [1/2]

A_UTILS_NS::cString adtf_ddl::access_element::get_value_as_string ( const T &  oDecoder,
const A_UTILS_NS::cString strElementName 
)

Get the value of an element as a string, using enum value names if available.

Parameters
[in]oDecoderThe decoder.
[in]strElementNameThe name of the element.
Returns
A string representation of the value.

Definition at line 520 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), get_value_as_string(), and IS_OK.

◆ get_value_as_string() [2/2]

A_UTILS_NS::cString adtf_ddl::access_element::get_value_as_string ( const T &  oDecoder,
size_t  nElement 
)

Get the value of an element as a string, using enum value names if available.

Parameters
[in]oDecoderThe decoder.
[in]nElementThe index of the element.
Returns
A string representation of the value.

Definition at line 508 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

Referenced by get_value_as_string().

◆ reset()

tResult adtf_ddl::access_element::reset ( T &  oCodec,
const A_UTILS_NS::cString strElementName 
)

Set the value of the requested element to zero.

Parameters
[in]oCodecThe codec.
[in]strElementNameThe name of the element.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 492 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and RETURN_IF_FAILED.

Referenced by StackPtr< Implementation, 64 >::StackPtr(), StackPtr< T, StackSize, Alignment >::reset(), and StackPtr< T, StackSize, Alignment >::swap().

◆ set_struct_value()

tResult adtf_ddl::access_element::set_struct_value ( Codec &  oCodec,
const A_UTILS_NS::cString strStructName,
const T *  pStructValue 
)

Copy a sub-structure into the structure.

Parameters
[in]oCodecThe codec.
[in]strStructNameThe name of the structure.
[in]pStructValueThe location the sub-structure will be copied from.
Return values
ERR_NOT_FOUNDNo structure with the requested name was found.

Definition at line 381 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References cMemoryBlock::MemCopy(), RETURN_ERROR, and RETURN_NOERROR.

◆ set_value() [1/2]

tResult adtf_ddl::access_element::set_value ( T &  oCodec,
const A_UTILS_NS::cString strElementName,
const A_UTILS_NS::cVariant oValue 
)

Set the value of an element by name.

Parameters
[in]oCodecThe codec.
[in]strElementNameThe name of the element.
[in]oValueThe new value.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 256 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and RETURN_IF_FAILED.

◆ set_value() [2/2]

tResult adtf_ddl::access_element::set_value ( T &  oCodec,
const A_UTILS_NS::cString strElementName,
const void *  pValue 
)

Set the value of an element by name.

Parameters
[in]oCodecThe codec.
[in]strElementNameThe name of the element.
[in]pValueThe location where the value should be copied from.
Return values
ERR_NOT_FOUNDNo element with the requested name was found.

Definition at line 223 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/extern/pkg_ddl/include/adtfddl/codec/access_element.h.

References find_index(), and RETURN_IF_FAILED.