ADM Document

class adm::Document : public std::enable_shared_from_this<Document>

Class representation of a whole ADM document.

Add ADM elements

If the ADM element was already added to the Document, it will not be added again.

bool add(std::shared_ptr<AudioProgramme> programme)

Add an AudioProgramme.

bool add(std::shared_ptr<AudioContent> content)

Add an AudioContent.

bool add(std::shared_ptr<AudioObject> object)

Add an AudioObject.

bool add(std::shared_ptr<AudioPackFormat> packFormat)

Add an AudioPackFormat.

bool add(std::shared_ptr<AudioChannelFormat> channelFormat)

Add an AudioChannelFormat.

bool add(std::shared_ptr<AudioStreamFormat> streamFormat)

Add an AudioStreamFormat.

bool add(std::shared_ptr<AudioTrackFormat> trackFormat)

Add an AudioTrackFormat.

bool add(std::shared_ptr<AudioTrackUid> trackUid)

Add an AudioTrackUid.

Remove ADM elements

References from and to the ADM element will automatically be removed too.

bool remove(std::shared_ptr<AudioProgramme> programme)

Remove an AudioProgramme.

bool remove(std::shared_ptr<AudioContent> content)

Remove an AudioContent.

bool remove(std::shared_ptr<AudioObject> object)

Remove an AudioObject.

bool remove(std::shared_ptr<AudioPackFormat> packFormat)

Remove an AudioPackFormat.

bool remove(std::shared_ptr<AudioChannelFormat> channelFormat)

Remove an AudioChannelFormat.

bool remove(std::shared_ptr<AudioStreamFormat> streamFormat)

Remove an AudioStreamFormat.

bool remove(std::shared_ptr<AudioTrackFormat> trackFormat)

Remove an AudioTrackFormat.

bool remove(std::shared_ptr<AudioTrackUid> trackUid)

Remove an AudioTrackUid.

Lookup ADM elements by its Id

Lookup the first ADM element with the given Id.

std::shared_ptr<AudioProgramme> lookup(const AudioProgrammeId &programmeId)

Lookup AudioProgramme using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioProgramme> lookup(const AudioProgrammeId &programmeId) const

Lookup AudioProgramme using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioContent> lookup(const AudioContentId &contentId)

Lookup AudioContent using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioContent> lookup(const AudioContentId &contentId) const

Lookup AudioContent using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioObject> lookup(const AudioObjectId &objectId)

Lookup AudioObject using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioObject> lookup(const AudioObjectId &objectId) const

Lookup AudioObject using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioPackFormat> lookup(const AudioPackFormatId &packFormatId)

Lookup AudioPackFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioPackFormat> lookup(const AudioPackFormatId &packFormatId) const

Lookup AudioPackFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioChannelFormat> lookup(const AudioChannelFormatId &channelFormatId)

Lookup AudioChannelFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioChannelFormat> lookup(const AudioChannelFormatId &channelFormatId) const

Lookup AudioChannelFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioStreamFormat> lookup(const AudioStreamFormatId &streamFormatId)

Lookup AudioStreamFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioStreamFormat> lookup(const AudioStreamFormatId &streamFormatId) const

Lookup AudioStreamFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioTrackFormat> lookup(const AudioTrackFormatId &trackFormatId)

Lookup AudioTrackFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioTrackFormat> lookup(const AudioTrackFormatId &trackFormatId) const

Lookup AudioTrackFormat using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<AudioTrackUid> lookup(const AudioTrackUidId &trackUidId)

Lookup AudioTrackUid using its id.

Returns

shared_ptr to the element, nullptr if not found

std::shared_ptr<const AudioTrackUid> lookup(const AudioTrackUidId &trackUidId) const

Lookup AudioTrackUid using its id.

Returns

shared_ptr to the element, nullptr if not found

Public Functions

std::shared_ptr<Document> deepCopy() const

Create a copy of the Document including all elements.

template<typename Element>
ElementRange<const Element> getElements() const

ADM elements getter template.

Templated getter with the wanted ADM element type as template argument.

template<typename Element>
ElementRange<Element> getElements()

ADM elements getter template.

Templated getter with the wanted ADM element type as template argument.

Public Static Functions

static std::shared_ptr<Document> create()

Static helper function to create an Document.

The constructor is private. This way it is ensured, that an Document can only be created as a std::shared_ptr.