ADTF  3.18.2
adtf::mediadescription::quiet Namespace Reference

Namespace for all functionality provided since v3.16. More...

Classes

class  stream_type_default
 Generator template to create an instance of the stream_meta_type_default. More...
 
class  stream_type_default< void >
 Specialization for generator template to create an instance of the stream_meta_type_default. More...
 
class  stream_type_default_array
 Generator template to create an instance of the stream_meta_type_default. More...
 
class  stream_type_default_array< void >
 
class  stream_type_default_array< ValueType[szArraySize]>
 Specialization for stream_type_default_array<T[N]>> More...
 
class  stream_type_default_array< std::array< ValueType, szArraySize > >
 Specialization for stream_type_default_array<std::array<T, N>> More...
 

Typedefs

template<typename ElementsType >
using element_callback = std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, const ddl::dd::datamodel::StructType::Element &)>
 Callback type for member elements.
 
template<typename ElementsType >
using element_control_callback = std::function< bool(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, const ddl::dd::datamodel::StructType::Element &)>
 Callback type for member elements. More...
 
template<typename ElementsType >
using array_element_callback = std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, size_t, const ddl::dd::datamodel::StructType::Element &)>
 Callback type for array elements. More...
 
template<typename ElementsType >
using array_element_control_callback = std::function< bool(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, size_t, const ddl::dd::datamodel::StructType::Element &)>
 Callback type for array elements. More...
 

Functions

template<typename ElementsType >
void for_each_element_infix (ElementsType &oElements, const ddl::dd::datamodel::StructType::Elements &oModelElements, const ddl::dd::datamodel::DataDefinition &oDataDefinition, const element_callback< ElementsType > &fnLeafCallback, const element_control_callback< ElementsType > &fnEnterMemberCallback, const element_callback< ElementsType > &fnLeaveMemberCallback, const array_element_control_callback< ElementsType > &fnEnterArrayMemberCallback, const array_element_callback< ElementsType > &fnLeaveArrayMemberCallback)
 Iterates elements and array elements in a callback-controlled fashion. More...
 

Detailed Description

Namespace for all functionality provided since v3.16.

Typedef Documentation

◆ array_element_callback

using array_element_callback = std::function<void(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&, size_t, const ddl::dd::datamodel::StructType::Element&)>

Callback type for array elements.

entered.

Definition at line 1622 of file sample_codec.h.

◆ array_element_control_callback

using array_element_control_callback = std::function<bool(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&, size_t, const ddl::dd::datamodel::StructType::Element&)>

Callback type for array elements.

The callbacks return value controls wether the member will actually be entered.

Definition at line 1632 of file sample_codec.h.

◆ element_control_callback

using element_control_callback = std::function<bool(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&, const ddl::dd::datamodel::StructType::Element&)>

Callback type for member elements.

The callbacks return value controls wether the member will actually be entered.

Definition at line 1612 of file sample_codec.h.

Function Documentation

◆ for_each_element_infix()

void for_each_element_infix ( ElementsType &  oElements,
const ddl::dd::datamodel::StructType::Elements oModelElements,
const ddl::dd::datamodel::DataDefinition oDataDefinition,
const element_callback< ElementsType > &  fnLeafCallback,
const element_control_callback< ElementsType > &  fnEnterMemberCallback,
const element_callback< ElementsType > &  fnLeaveMemberCallback,
const array_element_control_callback< ElementsType > &  fnEnterArrayMemberCallback,
const array_element_callback< ElementsType > &  fnLeaveArrayMemberCallback 
)

Iterates elements and array elements in a callback-controlled fashion.

This version also provides access to the corresponding elements in the data model. This can be used to access min/max and/or the element description.

Template Parameters
ElementsTypeThe type of elements.
Parameters
oElementsThe elements.
oModelElementsThe corresponding elements from the data model.
oDataDefinitionThe data definition that contains the data model.
fnLeafCallbackThe function to call per leaf element.
fnEnterMemberCallbackThe function to call per named member (leaf and intermediate). Controlls traversal of this member.
fnLeaveMemberCallbackThe function to call when leaving a member.
fnEnterArrayMemberCallbackThe function to call per array element. Controlls traversal of this element.
fnLeaveArrayMemberCallbackThe function to call when leaving an array element.

Definition at line 1735 of file sample_codec.h.

References TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::begin(), TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::getSize(), and THROW_ERROR_DESC.