ADTF
|
definition of the access_element namespace (codecs) More...
Classes | |
class | StructElementLegacy |
Legacy helper for the ddl::StructElement. More... | |
Functions | |
template<typename T > | |
a_util::result::Result | findIndex (const T &decoder, const std::string &element_name, size_t &index) |
find the index of an element by name. More... | |
template<typename T > | |
a_util::result::Result | findStructIndex (const T &decoder, const std::string &struct_name, size_t &index) |
find the index of the first element of a sub-structure by name. More... | |
template<typename T > | |
a_util::result::Result | findArrayIndex (const T &decoder, const std::string &array_name, size_t &index) |
find the index of the first element of an array by name. More... | |
template<typename T > | |
a_util::result::Result | findArrayEndIndex (const T &decoder, const std::string &array_name, size_t &index) |
find the index of the first element after an array by name. More... | |
template<typename T > | |
a_util::result::Result | getValue (const T &decoder, const std::string &element_name, void *value) |
Get the value of an element by name. More... | |
template<typename T > | |
a_util::result::Result | setValue (T &codec, const std::string &element_name, const void *value) |
Set the value of an element by name. More... | |
template<typename T > | |
a_util::variant::Variant | getValue (const T &decoder, const std::string &element_name) |
Get the value of an element by name. More... | |
template<typename T > | |
a_util::result::Result | setValue (T &codec, const std::string &element_name, const a_util::variant::Variant &value) |
Set the value of an element by name. More... | |
template<typename T > | |
a_util::variant::Variant | getValue (const T &decoder, size_t element_index) |
Get the value of an element by index. More... | |
template<typename T > | |
const void * | getValueAddress (const T &decoder, const std::string &element_name) |
Get a pointer to an element by name. More... | |
template<typename T > | |
void * | getValueAddress (T &codec, const std::string &element_name) |
Get a pointer to an element by name. More... | |
template<typename STRUCT , typename T > | |
const STRUCT * | getStructAddress (const T &decoder, const std::string &struct_name) |
Get a pointer to a sub-structure by name. More... | |
template<typename STRUCT , typename T > | |
STRUCT * | getStructAddress (T &codec, const std::string &struct_name) |
Get a pointer to a sub-structure by name. More... | |
template<typename T , typename CODEC > | |
a_util::result::Result | getStructValue (const CODEC &decoder, const std::string &struct_name, T *struct_value) |
Copy a sub-structure out of the structure. More... | |
template<typename T , typename CODEC > | |
a_util::result::Result | setStructValue (CODEC &codec, const std::string &struct_name, const T *struct_value) |
Copy a sub-structure into the structure. More... | |
template<typename ARRAY_TYPE , typename T > | |
const ARRAY_TYPE * | getArrayAddress (const T &decoder, const std::string &array_name) |
Get a pointer to an array by name. More... | |
template<typename ARRAY_TYPE , typename T > | |
ARRAY_TYPE * | getArrayAddress (T &codec, const std::string &array_name) |
Get a pointer to an array by name. More... | |
template<typename CODEC > | |
a_util::result::Result | getArray (const CODEC &decoder, const std::string &array_name, const void *&start_address, size_t &size) |
Get information about an array. More... | |
template<typename T , typename CODEC > | |
a_util::result::Result | getArrayValue (const CODEC &decoder, const std::string &array_name, T *array_value) |
Copy an array out of the structure. More... | |
template<typename T > | |
a_util::result::Result | reset (T &codec, const std::string &element_name) |
Set the value of the requested element to zero. More... | |
template<typename T > | |
std::string | getValueAsString (const T &decoder, size_t element_index) |
Get the value of an element as a string, using enum value names if available. More... | |
template<typename T > | |
std::string | getValueAsString (const T &decoder, const std::string &element_name) |
Get the value of an element as a string, using enum value names if available. More... | |
_MAKE_RESULT (-20, ERR_STRUCT_ELEMENT_NOT_FOUND) | |
Creates an a_util error ERR_AUTIL_NOT_FOUND. | |
definition of the access_element namespace (codecs)
a_util::result::Result ddl::access_element::findArrayEndIndex | ( | const T & | decoder, |
const std::string & | array_name, | ||
size_t & | index | ||
) |
find the index of the first element after an array by name.
[in] | decoder | The decoder or factory. |
[in] | array_name | The name of the array. |
[out] | index | The index of the found element. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 161 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References a_util::strings::compare(), and StructElement::name.
Referenced by getArray().
a_util::result::Result ddl::access_element::findArrayIndex | ( | const T & | decoder, |
const std::string & | array_name, | ||
size_t & | index | ||
) |
find the index of the first element of an array by name.
[in] | decoder | The decoder or factory. |
[in] | array_name | The name of the array. |
[out] | index | The index of the found element. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 146 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
Referenced by getArray(), and getArrayAddress().
a_util::result::Result ddl::access_element::findIndex | ( | const T & | decoder, |
const std::string & | element_name, | ||
size_t & | index | ||
) |
find the index of an element by name.
[in] | decoder | The decoder or factory. |
[in] | element_name | The name of the element. |
[in,out] | index | The index of the found element. Unchanged if index is not found. |
Definition at line 107 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References StructElement::name, and RETURN_ERROR_DESCRIPTION.
Referenced by getValue(), getValueAddress(), getValueAsString(), reset(), and setValue().
a_util::result::Result ddl::access_element::findStructIndex | ( | const T & | decoder, |
const std::string & | struct_name, | ||
size_t & | index | ||
) |
find the index of the first element of a sub-structure by name.
[in] | decoder | The decoder or factory. |
[in] | struct_name | The name of the sub-structure. |
[out] | index | The index of the found element. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 131 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
Referenced by getStructAddress().
a_util::result::Result ddl::access_element::getArray | ( | const CODEC & | decoder, |
const std::string & | array_name, | ||
const void *& | start_address, | ||
size_t & | size | ||
) |
Get information about an array.
[in] | decoder | The decoder. |
[in] | array_name | The name of the array. |
[out] | start_address | The address of the first element of the array. |
[out] | size | The byte size of all elements of that array. |
ERR_NOT_FOUND | No array with the requested name was found. |
Definition at line 416 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findArrayEndIndex(), findArrayIndex(), and RETURN_ERROR_DESCRIPTION.
Referenced by getArrayValue().
const ARRAY_TYPE* ddl::access_element::getArrayAddress | ( | const T & | decoder, |
const std::string & | array_name | ||
) |
Get a pointer to an array by name.
[in] | decoder | The decoder. |
[in] | array_name | The name of the array. |
Definition at line 380 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References adtf_ddl::access_element::find_array_index().
ARRAY_TYPE* ddl::access_element::getArrayAddress | ( | T & | codec, |
const std::string & | array_name | ||
) |
Get a pointer to an array by name.
[in] | codec | The codec. |
[in] | array_name | The name of the array. |
Definition at line 397 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findArrayIndex().
a_util::result::Result ddl::access_element::getArrayValue | ( | const CODEC & | decoder, |
const std::string & | array_name, | ||
T * | array_value | ||
) |
Copy an array out of the structure.
[in] | decoder | The decoder. |
[in] | array_name | The name of the array. |
[out] | array_value | The location the array will be copied to. |
ERR_NOT_FOUND | No array with the requested name was found. |
Definition at line 458 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References a_util::memory::copy(), and getArray().
const STRUCT* ddl::access_element::getStructAddress | ( | const T & | decoder, |
const std::string & | struct_name | ||
) |
Get a pointer to a sub-structure by name.
[in] | decoder | The codec. |
[in] | struct_name | The name of the structure. |
Definition at line 304 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findStructIndex().
STRUCT* ddl::access_element::getStructAddress | ( | T & | codec, |
const std::string & | struct_name | ||
) |
Get a pointer to a sub-structure by name.
[in] | codec | The codec. |
[in] | struct_name | The name of the structure. |
Definition at line 321 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findStructIndex().
a_util::result::Result ddl::access_element::getStructValue | ( | const CODEC & | decoder, |
const std::string & | struct_name, | ||
T * | struct_value | ||
) |
Copy a sub-structure out of the structure.
[in] | decoder | The decoder. |
[in] | struct_name | The name of the structure. |
[out] | struct_value | The location the sub-structure will be copied to. |
ERR_NOT_FOUND | No structure with the requested name was found. |
Definition at line 339 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References a_util::memory::copy(), and RETURN_ERROR_DESCRIPTION.
a_util::variant::Variant ddl::access_element::getValue | ( | const T & | decoder, |
const std::string & | element_name | ||
) |
Get the value of an element by name.
[in] | decoder | The decoder. |
[in] | element_name | The name of the element. |
The | value of the element. |
Definition at line 219 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex().
a_util::result::Result ddl::access_element::getValue | ( | const T & | decoder, |
const std::string & | element_name, | ||
void * | value | ||
) |
Get the value of an element by name.
[in] | decoder | The decoder. |
[in] | element_name | The name of the element. |
[out] | value | The location where the value should be copied to. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 190 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex().
a_util::variant::Variant ddl::access_element::getValue | ( | const T & | decoder, |
size_t | element_index | ||
) |
Get the value of an element by index.
[in] | decoder | The decoder. |
[in] | element_index | The index of the element. |
The | value of the element. |
Definition at line 253 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
const void* ddl::access_element::getValueAddress | ( | const T & | decoder, |
const std::string & | element_name | ||
) |
Get a pointer to an element by name.
[in] | decoder | The decoder. |
[in] | element_name | The name of the element. |
Definition at line 270 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References adtf_ddl::access_element::find_index().
void* ddl::access_element::getValueAddress | ( | T & | codec, |
const std::string & | element_name | ||
) |
Get a pointer to an element by name.
[in] | codec | The codec. |
[in] | element_name | The name of the element. |
Definition at line 287 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex().
std::string ddl::access_element::getValueAsString | ( | const T & | decoder, |
const std::string & | element_name | ||
) |
Get the value of an element as a string, using enum value names if available.
[in] | decoder | The decoder. |
[in] | element_name | The name of the element. |
Definition at line 547 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex(), and getValueAsString().
std::string ddl::access_element::getValueAsString | ( | const T & | decoder, |
size_t | element_index | ||
) |
Get the value of an element as a string, using enum value names if available.
[in] | decoder | The decoder. |
[in] | element_index | The index of the element. |
Definition at line 511 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References Variant::asString(), DDL_GET_ENUM_CASE, and Variant::getType().
Referenced by getValueAsString().
a_util::result::Result ddl::access_element::reset | ( | T & | codec, |
const std::string & | element_name | ||
) |
Set the value of the requested element to zero.
[in] | codec | The codec. |
[in] | element_name | The name of the element. |
NOT_FOUND | No element with the requested name was found. |
Definition at line 479 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex(), and a_util::memory::zero().
a_util::result::Result ddl::access_element::setStructValue | ( | CODEC & | codec, |
const std::string & | struct_name, | ||
const T * | struct_value | ||
) |
Copy a sub-structure into the structure.
[in] | codec | The codec. |
[in] | struct_name | The name of the structure. |
[in] | struct_value | The location the sub-structure will be copied from. |
ERR_NOT_FOUND | No structure with the requested name was found. |
Definition at line 360 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References a_util::memory::copy(), and RETURN_ERROR_DESCRIPTION.
a_util::result::Result ddl::access_element::setValue | ( | T & | codec, |
const std::string & | element_name, | ||
const a_util::variant::Variant & | value | ||
) |
Set the value of an element by name.
[in] | codec | The codec. |
[in] | element_name | The name of the element. |
[in] | value | The new value. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 237 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex().
a_util::result::Result ddl::access_element::setValue | ( | T & | codec, |
const std::string & | element_name, | ||
const void * | value | ||
) |
Set the value of an element by name.
[in] | codec | The codec. |
[in] | element_name | The name of the element. |
[in] | value | The location where the value should be copied from. |
ERR_NOT_FOUND | No element with the requested name was found. |
Definition at line 205 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/codec/legacy/access_element.h.
References findIndex().