Helpers¶
-
class
Route
¶ Route along ADM elements within an ADM document.
Describes route along ADM elements within an ADM document, i.e. which references were followed to reach a certain element from a given start point.
This is the same purpose (and basic interface) as
adm::Path
, but currently the implementation and constraints are different.Thus, the name
adm::Route
has been chosen to distinguish between those two.The main/essential difference is that the
adm::Route
stores pointers to the ADM elements, to make it easy to access the elements after aadm::Route
has been created, while theadm::Path
does not, as they might become invalid. Instead theadm::Path
stores the (coded) element ids, which are also used to check ifadm::Path
s are equal or not.To easily create an
adm::Route
you may use theadm::RouteTracer
.Public Types
-
typedef std::size_t
hash_type
¶
-
typedef std::vector<adm::ElementConstVariant>::iterator
iterator
¶
-
typedef std::vector<adm::ElementConstVariant>::const_iterator
const_iterator
¶
-
typedef adm::ElementConstVariant
value_type
¶
Public Functions
-
Route
()¶
-
void
add
(adm::ElementConstVariant element)¶
-
template<typename
Element
>
Route::const_iteratorfindFirstOf
() const¶
-
template<typename
Element
>
Route::const_iteratorfindLastOf
() const¶
-
const_iterator
begin
() const¶
-
const_iterator
end
() const¶
-
const adm::ElementConstVariant &
front
() const¶
-
const adm::ElementConstVariant &
back
() const¶
-
std::size_t
size
() const¶
-
typedef std::size_t
-
class
Path
¶ Path along ADM elements within an ADM document.
Describes route along ADM elements within an ADM document, i.e. which references were followed to reach a certain element from a given start point.
This is the same purpose (and basic interface) as
adm::Route
, but currently the implementation and constraints are different.Thus, the name
adm::Path
has been chosen to distinguish between those two.The main/essential difference is that the
adm::Route
stores pointers to the ADM elements, to make it easy to access the elements after aadm::Route
has been created, while theadm::Path
does not, as they might become invalid. Instead theadm::Path
stores the (coded) element ids, which are also used to check ifadm::Path
s are equal or not.Public Types
-
typedef std::size_t
hash_type
¶
-
typedef std::vector<ElementIdVariant>::iterator
iterator
¶
-
typedef std::vector<ElementIdVariant>::const_iterator
const_iterator
¶
Public Functions
-
void
add
(ElementConstVariant elementVariant)¶
-
void
add
(ElementIdVariant elementIdVariant)¶
-
const_iterator
begin
() const¶
-
const_iterator
end
() const¶
-
ElementIdVariant
front
() const¶
-
ElementIdVariant
back
() const¶
-
std::size_t
size
() const¶
-
template<typename
AdmElementId
>
AdmElementIdgetFirstOf
() const¶
-
template<typename
AdmElementId
>
AdmElementIdgetLastOf
() const¶
-
template<typename
AdmElementId
>
boolhasIdType
() const¶
-
typedef std::size_t
-
using
adm
::
RouteTracer
= detail::GenericRouteTracer<Route, detail::DefaultFullDepthStrategy>¶ Creates
adm::Route
s.This implementation traces the following route:
audioProgramme
audioContent
audioObject
audioPackFormat
audioChannelFormat
Complementary AudioObjects are not interpreted as such. Hence for every complementary audioObject an Route will be returned.
- Warning
If the ADM structure contains a reference cycle, trace will get stuck in an infinite loop.
-
template<typename
Property
, typenameElementPtr
>
Propertyadm
::
getPropertyOr
(ElementPtr element, Property defaultValue)¶ Return value of a property or a given defaultValue if the property is not available.
This is just a more expressive shorthand equivalent to
element->has<Property>() ? element->get<Property>() : defaultValue;