DSPatch  v.3.00
C++ Cross-Platform, Object-Oriented, Flow-Based Programming Library
Public Types | Public Member Functions | List of all members
DspParameter Class Reference

Value container used to hold non-transient component IO. More...

#include <DspParameter.h>

Public Types

enum  ParamType {
  Null, Bool, Int, Float,
  String, FilePath, List, Trigger
}
 

Public Member Functions

 DspParameter (ParamType const &type)
 
 DspParameter (ParamType const &type, int const &initValue, std::pair< int, int > const &valueRange=std::make_pair(-1,-1))
 
 DspParameter (ParamType const &type, float const &initValue, std::pair< float, float > const &valueRange=std::make_pair(-1.0f,-1.0f))
 
 DspParameter (ParamType const &type, std::string const &initValue)
 
 DspParameter (ParamType const &type, std::vector< std::string > const &initValue)
 
ParamType Type () const
 
bool IsSet () const
 
bool const * GetBool () const
 
int const * GetInt () const
 
std::pair< int, int > const * GetIntRange () const
 
float const * GetFloat () const
 
std::pair< float, float > const * GetFloatRange () const
 
std::string const * GetString () const
 
std::vector< std::string > const * GetList () const
 
bool SetBool (bool const &value)
 
bool SetInt (int const &value)
 
bool SetIntRange (std::pair< int, int > const &intRange)
 
bool SetFloat (float const &value)
 
bool SetFloatRange (std::pair< float, float > const &floatRange)
 
bool SetString (std::string const &value)
 
bool SetList (std::vector< std::string > const &value)
 
bool SetParam (DspParameter const &param)
 

Detailed Description

Value container used to hold non-transient component IO.

DspParameters are similar to DspSignals in that they provide a generic means of inputting and outputting data to and from DspComponents. However, unlike signals, parameters are non-transient inputs and outputs (such as enable / disable, bias, offset, etc.) that allow for a component's behaviour to be manipulated via direct set / get methods. The parameter type (ParamType) must be specified on construction of a DspParameter. Any type mismatches on subsequent set / get calls will immediatly return false.

NOTE: Abstracting component parameters behind the generic DspParameter container allows a component to be entirely controllable via the DspComponent base class.

Definition at line 49 of file DspParameter.h.


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