|
HART
0.2.0
High level Audio Regression and Testing
|
A set of boolean flags mapped to each audio channel. More...
#include <hart_channel_flags.hpp>
Public Member Functions | |
| ChannelFlags (bool defaultValues=true, size_t numChannels=m_maxChannels) | |
| Creates a new channel flags object. | |
| void | setAllTo (bool newValues) |
| Sets all flags to a new value. | |
| size_t | size () const noexcept |
| Returns the size (not capacity) of the container. | |
| void | resize (size_t newNumChannels) |
| Resizes the container. | |
| std::bitset< m_maxChannels >::reference | operator[] (size_t channel) |
| Access the flag value for a specific channel. | |
| bool | operator[] (size_t channel) const |
| Access the flag value for a specific channel. | |
| bool | allTrue () const noexcept |
Checks if all flags are set to true | |
| size_t | numTrue () |
Checks how many channels are marked with true | |
| bool | anyTrue () const noexcept |
Checks if any of the flags is set to true | |
| void | representAsInitializerList (std::ostream &stream) const |
| Makes text representation of itself as a initializer list of active channels. | |
A set of boolean flags mapped to each audio channel.
Definition at line 13 of file hart_channel_flags.hpp.
|
inline |
Creates a new channel flags object.
| defaultValues | Initial value for all flags |
| numChannels | Size of the contailer |
Definition at line 22 of file hart_channel_flags.hpp.
Sets all flags to a new value.
| newValues | New values for all flags |
Definition at line 33 of file hart_channel_flags.hpp.
|
inlinenoexcept |
Returns the size (not capacity) of the container.
This size is guaranteed to be equal to the number of channels in whatever it's assotiated with, or more.
Definition at line 44 of file hart_channel_flags.hpp.
Resizes the container.
Does not change the capacity - it's fixed. Does not change the flags values.
Definition at line 52 of file hart_channel_flags.hpp.
Access the flag value for a specific channel.
| channel | Number of channel (0-based) |
Definition at line 63 of file hart_channel_flags.hpp.
Access the flag value for a specific channel.
| channel | Number of channel (0-based) |
Definition at line 73 of file hart_channel_flags.hpp.
|
inlinenoexcept |
Checks if all flags are set to true
true if all flags for all channels are true, false otherwise Definition at line 82 of file hart_channel_flags.hpp.
|
inline |
Checks how many channels are marked with true
true Definition at line 95 of file hart_channel_flags.hpp.
|
inlinenoexcept |
Checks if any of the flags is set to true
true if flag for at least one channel is true, false otherwise Definition at line 107 of file hart_channel_flags.hpp.
|
inline |
Makes text representation of itself as a initializer list of active channels.
| [out] | stream | Output stream to write to |
Definition at line 120 of file hart_channel_flags.hpp.