#include <channel_list.hpp>
Class representing a list of channel indices. It is used to specify arbitrary connections and channel routings between audio ports.
- See also
- CompositeComponent::audioConnection
visr::ChannelList::ChannelList |
( |
| ) |
|
|
default |
Default constructor, creates an empty channel list.
visr::ChannelList::ChannelList |
( |
ChannelRange const & |
range | ) |
|
Construct a channel list from a single channel range, i.e., from a start, stop, stride description. This constructor is supposed to support type conversion, for instance to enable the use of a ChannelRange object in a CompositeComponent::audioConnection() call. Therefore it is not marked as explicit.
- Parameters
-
range | A ChannelRange object defining an equidistantly strided range of channels. |
visr::ChannelList::ChannelList |
( |
std::initializer_list< IndexType > const & |
initList | ) |
|
Construct a channel list from an initialiser list. This constructor is suppoed to be used for type conversion, for instance to enable an initialiser list as argument in a CompositeComponent::audioConnection call. Therefore it is not marked as explicit.
- Parameters
-
initList | Initaliser list of channels indices, typically a comma,separated sequence enclosed in curly braces. |
visr::ChannelList::ChannelList |
( |
std::initializer_list< ChannelRange > const & |
initList | ) |
|
Construct a channel list from a initialiser list of ChannelRange objects. This constructor is to support implicit type conversion, for instance to use an initialiser list directly in a CompositeComponent::audioConnection call.
- Parameters
-
initList | Initialiser list of ChannelRange objects, typically enclosed in curly braces. |
template<class Container >
visr::ChannelList::ChannelList |
( |
Container const & |
container | ) |
|
|
inline |
Construct a channel list from a container.
- Note
- This template member function is not an export of the shared library because it is instantiated at the caller site.
-
With C++11, the implementation might use std::cbegin() and std::cend() instead.
- Template Parameters
-
Container | Array type for which std::begin() and std::end() are specialized and whose value type is convertible to the index type. |
- Parameters
-
container | Container containing indices (or data convertible to indices) |
template<class Iterator >
visr::ChannelList::ChannelList |
( |
Iterator |
begin, |
|
|
Iterator |
end |
|
) |
| |
|
inline |
Construct a channel list from a sequence.
- Template Parameters
-
Iterator | Iterator type matching the forward iterator concept and whose referenced type is convertible to the index type. |
- Parameters
-
begin | Begin iterator |
end | Past-the-end iterator |
visr::ChannelList::~ChannelList |
( |
| ) |
|
|
default |
Bounds-checking index access to the channel indices, const version.
- Exceptions
-
std::out_of_range | If idx exceeds the number of indices in the list. |
- Parameters
-
idx | Zero-offset position index within the channel list. |
Bounds-checking index access to the channel indices.
- Exceptions
-
std::out_of_range | If idx exceeds the number of indices in the list. |
- Parameters
-
idx | Zero-offset position index within the channel list. |
Return a const iterator to the beginning of the index list.
- Todo:
Check whether we should provide a cbegin() version as well.
Check whether we should provide a non-const version too.
Return a const iterator to the end of the index list.
- Todo:
Check whether we should provide a cend() version as well.
Check whether we should provide a non-const version too.
Unchecked index access to the channel indices, const version. Does not check whether idx is within the permissible range.
- Parameters
-
idx | Zero-offset position index within the channel list. |
Unchecked index access to the channel indices. Does not check whether idx is within the permissible range.
- Parameters
-
idx | Zero-offset position index within the channel list. |
std::size_t visr::ChannelList::size |
( |
| ) |
const |
Return the number of elements in the channel list.
The documentation for this class was generated from the following files: