VISR  0.11.1
Versatile Interactive Scene Renderer
visr::pythoncomponents::Wrapper Class Reference

#include <wrapper.hpp>

Inheritance diagram for visr::pythoncomponents::Wrapper:
visr::CompositeComponent visr::Component

Classes

class  Impl
 

Public Member Functions

 Wrapper (SignalFlowContext const &context, char const *name, CompositeComponent *parent, char const *moduleName, char const *componentClassName, char const *positionalArguments="", char const *keywordArguments="", char const *moduleSearchPath="")
 
 ~Wrapper ()
 
- Public Member Functions inherited from visr::CompositeComponent
 CompositeComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 ~CompositeComponent ()
 
std::size_t numberOfComponents () const
 
impl::CompositeComponentImplementationimplementation ()
 
impl::CompositeComponentImplementation const & implementation () const
 
void parameterConnection (char const *sendComponent, char const *sendPort, char const *receiveComponent, char const *receivePort)
 
void parameterConnection (ParameterPortBase &sender, ParameterPortBase &receiver)
 
void audioConnection (char const *sendComponent, char const *sendPort, ChannelList const &sendIndices, char const *receiveComponent, char const *receivePort, ChannelList const &receiveIndices)
 
void audioConnection (AudioPortBase &sendPort, ChannelList const &sendIndices, AudioPortBase &receivePort, ChannelList const &receiveIndices)
 
void audioConnection (AudioPortBase &sendPort, AudioPortBase &receivePort)
 
- Public Member Functions inherited from visr::Component
 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
 
Componentoperator= (Component const &)=delete
 
Componentoperator= (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
 
AudioPortBaseaudioPort (char const *portName)
 
AudioPortBase const & audioPort (char const *portName) const
 
AudioPortBaseaudioPort (std::string const &portName)
 
AudioPortBase const & audioPort (std::string const &portName) const
 
ParameterPortBaseparameterPort (char const *portName)
 
ParameterPortBase const & parameterPort (char const *portName) const
 
ParameterPortBaseparameterPort (std::string const &portName)
 
ParameterPortBase const & parameterPort (std::string const &portName) const
 
SamplingFrequencyType samplingFrequency () const
 
std::size_t period () const
 
bool isTopLevel () const
 
impl::ComponentImplementationimplementation ()
 
impl::ComponentImplementation const & implementation () const
 

Additional Inherited Members

- Public Types inherited from visr::CompositeComponent
using ChannelRange = visr::ChannelRange
 
using ChannelList = visr::ChannelList
 
- Static Public Member Functions inherited from visr::Component
static const std::string & nameSeparator ()
 
- Protected Member Functions inherited from visr::Component
 Component (impl::ComponentImplementation *impl)
 

Detailed Description

Wrapper component that encapsulates arbitrary Python components (atomic or composite) to be instantiated and called from C++.

Constructor & Destructor Documentation

◆ Wrapper()

visr::pythoncomponents::Wrapper::Wrapper ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
char const *  moduleName,
char const *  componentClassName,
char const *  positionalArguments = "",
char const *  keywordArguments = "",
char const *  moduleSearchPath = "" 
)
explicit

Constructor, creates a Wrapper object.

Parameters
contextConfiguration parameter containing information as period length and sampling frequency.
nameThe name of the component. Must be unique within the containing AudioSignalFlow.
parentPointer to a containing component, if there is one. A value of nullptr signals that this is a top-level component.
moduleNameName of the Python module containing the class to be instantiated. Undecorated name as used, e.g., for in a Python 'import' statement.
componentClassNameThe class name of the Python component to be instantiated. The class must inherited from visr::Component, that is, either from CompositeComponent or AtomicComponent.
positionalArgumentsComma-separated list of positional arguments to be passed to the constructor of the Python component. This list must not include the context, name, and parent arguments which are provided automatically.
keywordArgumentsOptional, comma-separated key-value pairs of the form "key:value" to provide keyword arguments to the Python component.
moduleSearchPathOptional, comma-separated list of directories to search for the module named by the moduleName option (in addition to the default search path).

◆ ~Wrapper()

visr::pythoncomponents::Wrapper::~Wrapper ( )

Destructor.


The documentation for this class was generated from the following files: