15 #ifndef DDL_SERIALIZER_CLASS_HEADER
16 #define DDL_SERIALIZER_CLASS_HEADER
19 #include <ddl/codec/codec.h>
36 template <
typename DECODER,
typename ENCODER>
41 uint64_t value_pointer;
43 element.getRawValue(&value_pointer, sizeof(value_pointer));
44 encoder.setElementRawValue(element.getIndex(), &value_pointer, sizeof(value_pointer));
47 catch (
const std::exception&) {
48 return ERR_AUTIL_UNEXPECTED;
Memory buffer class to encapsulate and manage raw contiguously memory.
A common result class usable as return value throughout.
Decoder for dynamic structures defined by a DataDefinition definition.
bool zero(void *dest, std::size_t dest_size, std::size_t bytes_to_zero)
Portable safe memzero.
a_util::result::Result transform(const DECODER &decoder, ENCODER &encoder)
Copies all elements from a decoder to a codec.
_MAKE_RESULT(-3, ERR_AUTIL_UNEXPECTED)
Creates an a_util error ERR_AUTIL_UNEXPECTED.
void forEachLeafElement(ElementsType &elements, const std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> &func)
Iterates ALL leaf elements within ALL array elements.
a_util::result::Result transformToBuffer(const codec::Decoder &decoder, a_util::memory::MemoryBuffer &buffer, bool zero=false)
Tranforms the data from a given decoder into the opposite data representation.
definition of the ddl namespace
Implementation of the ADTF default media description.
Common include for component a_util::result.