![]() |
VISR
0.11.8
Versatile Interactive Scene Renderer
|
#include <component.hpp>
Public Member Functions | |
Component (SignalFlowContext const &context, char const *componentName, CompositeComponent *parent) | |
Component (SignalFlowContext const &context, std::string const &componentName, CompositeComponent *parent) | |
Component (Component const &)=delete | |
Component (Component &&)=delete | |
Component & | operator= (Component const &)=delete |
Component & | operator= (Component &&)=delete |
virtual | ~Component () |
std::string const & | name () const |
std::string | fullName () const |
void | status (StatusMessage::Kind status, char const *message) |
template<typename ... MessageArgs> | |
void | status (StatusMessage::Kind status, MessageArgs ... args) |
bool | isComposite () const |
AudioPortBase & | audioPort (char const *portName) |
AudioPortBase const & | audioPort (char const *portName) const |
AudioPortBase & | audioPort (std::string const &portName) |
AudioPortBase const & | audioPort (std::string const &portName) const |
ParameterPortBase & | parameterPort (char const *portName) |
ParameterPortBase const & | parameterPort (char const *portName) const |
ParameterPortBase & | parameterPort (std::string const &portName) |
ParameterPortBase const & | parameterPort (std::string const &portName) const |
SamplingFrequencyType | samplingFrequency () const |
std::size_t | period () const |
bool | isTopLevel () const |
impl::ComponentImplementation & | implementation () |
impl::ComponentImplementation const & | implementation () const |
Static Public Member Functions | |
static const std::string & | nameSeparator () |
Protected Member Functions | |
Component (impl::ComponentImplementation *impl) | |
Base class for processing components. Components may contain ports to exchange data (either audio signal or parameter) with other components or with the exterior. A component may have a parent, that is, a composite component it is contained in. If the parent is null it is a top-level component. Components also have a name, which must be unique within a containing composite component.
|
explicit |
Constructor, constructs a component.
context | Configuration object containing basic execution parameters (such as sampling frequency and period (block length)) |
componentName | The name of the component. If this component is contained in a higher-level parent component, the name must be unique within that parent component |
parent | Pointer to the containing composite component, if there is one. Otherwise, that is, if the present component is at the top level, pass nullptr . |
|
explicit |
Constructor. Convenvience function, accepts a standard string instead of a C chararacter pointer.
context | Configuration object containing basic execution parameters (such as sampling frequency and period (block length)) |
componentName | The name of the component. If this component is contained in a higher-level parent component, the name must be unique within that parent component. |
parent | Pointer to the containing composite component, if there is one. Otherwise, that is, if the present component is at the top level, pass nullptr . |
|
delete |
Deleted copy constructor to avoid copy construction of this and derived classes.
|
delete |
Deleted move constructor to avoid moving of this and derived classes.
|
virtual |
Destructor (virtual)
|
explicitprotected |
Constructor that receives the internal implementation object. This overload has to be called by the other constructors (including those of subclasses) to make sure that the implementation object is instantiated. The motivation for this constructor is to provide different implementation objects for different subclasses.
AudioPortBase & visr::Component::audioPort | ( | char const * | portName | ) |
AudioPortBase const & visr::Component::audioPort | ( | char const * | portName | ) | const |
AudioPortBase & visr::Component::audioPort | ( | std::string const & | portName | ) |
AudioPortBase const & visr::Component::audioPort | ( | std::string const & | portName | ) | const |
std::string visr::Component::fullName | ( | ) | const |
Return the full, hierarchical name of the component.
impl::ComponentImplementation & visr::Component::implementation | ( | ) |
Provide a pointer to an external implementation object. The type of this implementation object is opaque, i.e., not visible from the public VISR API.
impl::ComponentImplementation const & visr::Component::implementation | ( | ) | const |
Provide a pointer to an external implementation object, constant version. The type of this implementation object is opaque, i.e., not visible from the public VISR API.
bool visr::Component::isComposite | ( | ) | const |
Query whether this component is atomic (i.e., a piece of code implementing a rendering functionality) or a composite consisting of an interconnection of atomic (or further composite) components.
bool visr::Component::isTopLevel | ( | ) | const |
Query whether the component is at the top level of a signal flow.
std::string const & visr::Component::name | ( | ) | const |
Return the 'local', non-hierarchical name.
|
static |
Separator used to form hierarchical names.
Deleted assignment operator to prohibit (copy) assignment of this and derived classes.
Deleted assignment operator to prohibit move assignment of this and derived classes.
ParameterPortBase & visr::Component::parameterPort | ( | char const * | portName | ) |
ParameterPortBase const & visr::Component::parameterPort | ( | char const * | portName | ) | const |
ParameterPortBase & visr::Component::parameterPort | ( | std::string const & | portName | ) |
ParameterPortBase const & visr::Component::parameterPort | ( | std::string const & | portName | ) | const |
std::size_t visr::Component::period | ( | ) | const |
Return the period of the containing signal processing graph, i.e., the number of samples processed in each invocation of the process function of the derived audio components. This methods can be called at any point of the lifetime of the derived component, i.e., for instance in the constructor.
SamplingFrequencyType visr::Component::samplingFrequency | ( | ) | const |
Return the sampling frequency of the containing signal flow.
void visr::Component::status | ( | StatusMessage::Kind | status, |
char const * | message | ||
) |
Signal informational messages or the error conditions. Depending on the value of the status
parameter, this might result in a message conveyed to the user or abortion of the audio processing.
status | The class of the status message |
message | An informational message string. |
|
inline |
Signal informational messages or the error conditions where the message string is constructed from an arbitrary sequence of arguments. Depending on the value of the status
parameter, this might result in a message conveyed to the user or abortion of the audio processing.
MessageArgs | List of argument types to be printed. Normally they are automatically determined by the compiler, so there is no need to specify them. |
status | The class of the status message |
args | Comma-seprated list of parameters with unspecified types. The main requirement is that all types support an "<<" operator. |