Essentia  2.1-beta6-dev
Parameter Class Reference

#include <parameter.h>

Public Types

enum  ParamType {
  UNDEFINED , REAL , STRING , BOOL ,
  INT , STEREOSAMPLE , VECTOR_REAL , VECTOR_STRING ,
  VECTOR_BOOL , VECTOR_INT , VECTOR_STEREOSAMPLE , VECTOR_VECTOR_REAL ,
  VECTOR_VECTOR_STRING , VECTOR_VECTOR_STEREOSAMPLE , VECTOR_MATRIX_REAL , MAP_VECTOR_REAL ,
  MAP_VECTOR_STRING , MAP_VECTOR_INT , MAP_REAL , MATRIX_REAL
}
 

Public Member Functions

 Parameter (ParamType tp)
 
 Parameter (const std::string &x)
 
 Parameter (const Real &x)
 
 Parameter (const bool &x)
 
 Parameter (const int &x)
 
 Parameter (const double &x)
 
 Parameter (const uint &x)
 
 Parameter (const StereoSample &x)
 
 Parameter (const char *x)
 
 Parameter (const std::vector< Real > &v)
 
 Parameter (const std::vector< std::string > &v)
 
 Parameter (const std::vector< bool > &v)
 
 Parameter (const std::vector< int > &v)
 
 Parameter (const std::vector< StereoSample > &v)
 
 Parameter (const std::vector< std::vector< Real > > &v)
 
 Parameter (const std::vector< std::vector< std::string > > &v)
 
 Parameter (const std::vector< std::vector< StereoSample > > &v)
 
 Parameter (const std::vector< TNT::Array2D< Real > > &v)
 
 Parameter (const std::map< std::string, std::vector< std::string > > &m)
 
 Parameter (const std::map< std::string, std::vector< Real > > &m)
 
 Parameter (const std::map< std::string, std::vector< int > > &m)
 
 Parameter (const std::map< std::string, Real > &m)
 
 Parameter (const TNT::Array2D< Real > &mat)
 
 Parameter (const Parameter &p)
 
 Parameter (const Parameter *p)
 
 ~Parameter ()
 
void clear ()
 
Parameteroperator= (const Parameter &p)
 
bool operator== (const Parameter &p) const
 
bool operator!= (const Parameter &p) const
 
ParamType type () const
 
bool isConfigured () const
 
std::string toString (int precision=12) const
 
std::string toLower () const
 
bool toBool () const
 
double toDouble () const
 
float toFloat () const
 
StereoSample toStereoSample () const
 
int toInt () const
 
Real toReal () const
 
std::vector< RealtoVectorReal () const
 
std::vector< std::string > toVectorString () const
 
std::vector< int > toVectorInt () const
 
std::vector< bool > toVectorBool () const
 
std::vector< StereoSampletoVectorStereoSample () const
 
std::vector< std::vector< Real > > toVectorVectorReal () const
 
std::vector< std::vector< std::string > > toVectorVectorString () const
 
std::vector< std::vector< StereoSample > > toVectorVectorStereoSample () const
 
std::vector< TNT::Array2D< Real > > toVectorMatrixReal () const
 
std::map< std::string, std::vector< Real > > toMapVectorReal () const
 
std::map< std::string, std::vector< std::string > > toMapVectorString () const
 
std::map< std::string, std::vector< int > > toMapVectorInt () const
 
std::map< std::string, RealtoMapReal () const
 
TNT::Array2D< RealtoMatrixReal () const
 

Private Attributes

ParamType _type
 
std::string _str
 
Real _real
 
bool _boolean
 
std::vector< Parameter * > _vec
 
std::map< std::string, Parameter * > _map
 
StereoSample _ssamp
 
bool _configured
 

Member Enumeration Documentation

◆ ParamType

enum ParamType
Enumerator
UNDEFINED 
REAL 
STRING 
BOOL 
INT 
STEREOSAMPLE 
VECTOR_REAL 
VECTOR_STRING 
VECTOR_BOOL 
VECTOR_INT 
VECTOR_STEREOSAMPLE 
VECTOR_VECTOR_REAL 
VECTOR_VECTOR_STRING 
VECTOR_VECTOR_STEREOSAMPLE 
VECTOR_MATRIX_REAL 
MAP_VECTOR_REAL 
MAP_VECTOR_STRING 
MAP_VECTOR_INT 
MAP_REAL 
MATRIX_REAL 

Constructor & Destructor Documentation

◆ Parameter() [1/25]

Parameter ( ParamType  tp)
inline

◆ Parameter() [2/25]

Parameter ( const std::string &  x)
inline

◆ Parameter() [3/25]

Parameter ( const Real x)
inline

◆ Parameter() [4/25]

Parameter ( const bool &  x)
inline

◆ Parameter() [5/25]

Parameter ( const int &  x)
inline

◆ Parameter() [6/25]

Parameter ( const double &  x)
inline

◆ Parameter() [7/25]

Parameter ( const uint x)
inline

◆ Parameter() [8/25]

Parameter ( const StereoSample x)
inline

◆ Parameter() [9/25]

Parameter ( const char *  x)
inline

◆ Parameter() [10/25]

Parameter ( const std::vector< Real > &  v)
inline

◆ Parameter() [11/25]

Parameter ( const std::vector< std::string > &  v)
inline

◆ Parameter() [12/25]

Parameter ( const std::vector< bool > &  v)
inline

◆ Parameter() [13/25]

Parameter ( const std::vector< int > &  v)
inline

◆ Parameter() [14/25]

Parameter ( const std::vector< StereoSample > &  v)
inline

◆ Parameter() [15/25]

Parameter ( const std::vector< std::vector< Real > > &  v)
inline

◆ Parameter() [16/25]

Parameter ( const std::vector< std::vector< std::string > > &  v)
inline

◆ Parameter() [17/25]

Parameter ( const std::vector< std::vector< StereoSample > > &  v)
inline

◆ Parameter() [18/25]

Parameter ( const std::vector< TNT::Array2D< Real > > &  v)
inline

◆ Parameter() [19/25]

Parameter ( const std::map< std::string, std::vector< std::string > > &  m)
inline

◆ Parameter() [20/25]

Parameter ( const std::map< std::string, std::vector< Real > > &  m)
inline

◆ Parameter() [21/25]

Parameter ( const std::map< std::string, std::vector< int > > &  m)
inline

◆ Parameter() [22/25]

Parameter ( const std::map< std::string, Real > &  m)
inline

◆ Parameter() [23/25]

Parameter ( const TNT::Array2D< Real > &  mat)
inline

◆ Parameter() [24/25]

Parameter ( const Parameter p)

◆ Parameter() [25/25]

Parameter ( const Parameter p)

◆ ~Parameter()

~Parameter ( )

Member Function Documentation

◆ clear()

void clear ( )

◆ isConfigured()

bool isConfigured ( ) const
inline

◆ operator!=()

bool operator!= ( const Parameter p) const

◆ operator=()

Parameter& operator= ( const Parameter p)

◆ operator==()

bool operator== ( const Parameter p) const

◆ toBool()

bool toBool ( ) const
inline

◆ toDouble()

double toDouble ( ) const
inline

◆ toFloat()

float toFloat ( ) const
inline

◆ toInt()

int toInt ( ) const
inline

◆ toLower()

std::string toLower ( ) const

◆ toMapReal()

std::map<std::string, Real > toMapReal ( ) const
inline

◆ toMapVectorInt()

std::map<std::string, std::vector<int> > toMapVectorInt ( ) const
inline

◆ toMapVectorReal()

std::map<std::string, std::vector<Real> > toMapVectorReal ( ) const
inline

◆ toMapVectorString()

std::map<std::string, std::vector<std::string> > toMapVectorString ( ) const
inline

◆ toMatrixReal()

TNT::Array2D< Real > toMatrixReal ( ) const
inline

◆ toReal()

Real toReal ( ) const
inline

◆ toStereoSample()

StereoSample toStereoSample ( ) const
inline

◆ toString()

std::string toString ( int  precision = 12) const

◆ toVectorBool()

std::vector< bool > toVectorBool ( ) const
inline

◆ toVectorInt()

std::vector< int > toVectorInt ( ) const
inline

◆ toVectorMatrixReal()

std::vector< TNT::Array2D<Real> > toVectorMatrixReal ( ) const
inline

◆ toVectorReal()

std::vector< Real > toVectorReal ( ) const
inline

◆ toVectorStereoSample()

std::vector< StereoSample > toVectorStereoSample ( ) const
inline

◆ toVectorString()

std::vector< std::string > toVectorString ( ) const
inline

◆ toVectorVectorReal()

std::vector< std::vector<Real> > toVectorVectorReal ( ) const
inline

◆ toVectorVectorStereoSample()

std::vector< std::vector<StereoSample> > toVectorVectorStereoSample ( ) const
inline

◆ toVectorVectorString()

std::vector< std::vector<std::string> > toVectorVectorString ( ) const
inline

◆ type()

ParamType type ( ) const
inline

Member Data Documentation

◆ _boolean

bool _boolean
private

◆ _configured

bool _configured
private

◆ _map

std::map<std::string, Parameter*> _map
private

◆ _real

Real _real
private

◆ _ssamp

StereoSample _ssamp
private

◆ _str

std::string _str
private

◆ _type

ParamType _type
private

◆ _vec

std::vector<Parameter*> _vec
private

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