Detailed Description

Classes designed to make content reading more convenient.

Classes

class  ARA::ContentReaderEventIterator< ContentReader >
 Fully C++11 stl-compatible iterator adapter for ContentReader. More...
 
class  ARA::ContentReader< contentType, ControllerType, ContentReaderRefType, ValidatorClass >
 Wrapper class for convenient and type safe content reading. More...
 

Class Documentation

◆ ARA::ContentReaderEventIterator

class ARA::ContentReaderEventIterator

template<typename ContentReader>
class ARA::ContentReaderEventIterator< ContentReader >

Fully C++11 stl-compatible iterator adapter for ContentReader.

auto tempoContentReader = createTempoReaderForAudioSource (...);
for (const auto& tempoEntry : tempoContentReader)
processTempoEntry (tempoEntry);

See also https://en.cppreference.com/w/cpp/iterator

◆ ARA::ContentReader

class ARA::ContentReader

template<ARAContentType contentType, typename ControllerType, typename ContentReaderRefType, typename ValidatorClass = NoContentValidator<contentType, ControllerType, ContentReaderRefType>>
class ARA::ContentReader< contentType, ControllerType, ContentReaderRefType, ValidatorClass >

Wrapper class for convenient and type safe content reading.

Inheritance diagram for ARA::ContentReader< contentType, ControllerType, ContentReaderRefType, ValidatorClass >:
ARA::PlugIn::HostContentReader< contentType >

Public Types

using DataType = typename ContentTypeMapper< contentType >::DataType
 The type of ARA content data for this reader.
 

Public Member Functions

 operator bool () const noexcept
 Tests whether content is available. Can be written as if (someContentReader) ...
 
ARAContentGrade getGrade () const noexcept
 Get the grade of the content.
 
ARAInt32 getEventCount () const noexcept
 Get the number of content events. Will be 0 if content is not available, or for time-limited content types if range does not cover any events.
 
const DataType * getDataPtrForEvent (ARAInt32 eventIndex) const noexcept
 Returns a pointer to the data at index eventIndex. Care must be taken when accessing this pointer, its content will only be valid until any other content reading call is made or the reader is destroyed!
 
DataType getDataForEvent (ARAInt32 eventIndex) const noexcept
 Returns the data at index eventIndex.
 
DataType operator[] (ARAInt32 eventIndex) const noexcept
 Returns the data at index eventIndex.
 

STL Iterator Compatibility

See ContentReaderEventIterator <>.

using const_iterator = ContentReaderEventIterator< ContentReader >
 
const_iterator begin () const
 
const_iterator end () const