#include <core/parametermanager.h>
Public Member Functions | |
ParameterManager (const std::string &name, int id) | |
virtual | ~ParameterManager () |
void | setCurrentParameterGroup (const std::string &group=std::string()) |
set group for all subsequently added parameters, reset with empty group More... | |
const std::string & | currentParameterGroup () const |
virtual Parameter * | addParameterGeneric (const std::string &name, std::shared_ptr< Parameter > parameter) |
bool | updateParameter (const std::string &name, const Parameter *parameter, const message::SetParameter *inResponseTo, Parameter::RangeType rt=Parameter::Value) |
template<class T > | |
Parameter * | addParameter (const std::string &name, const std::string &description, const T &value, Parameter::Presentation presentation=Parameter::Generic) |
template<class T > | |
bool | setParameter (const std::string &name, const T &value, const message::SetParameter *inResponseTo=nullptr) |
template<class T > | |
bool | setParameter (ParameterBase< T > *param, const T &value, const message::SetParameter *inResponseTo=nullptr) |
template<class T > | |
bool | setParameterMinimum (ParameterBase< T > *param, const T &minimum) |
template<class T > | |
bool | setParameterMaximum (ParameterBase< T > *param, const T &maximum) |
template<class T > | |
bool | setParameterRange (const std::string &name, const T &minimum, const T &maximum) |
template<class T > | |
bool | setParameterRange (ParameterBase< T > *param, const T &minimum, const T &maximum) |
template<class T > | |
bool | getParameter (const std::string &name, T &value) const |
void | setParameterChoices (const std::string &name, const std::vector< std::string > &choices) |
void | setParameterChoices (Parameter *param, const std::vector< std::string > &choices) |
void | setParameterFilters (const std::string &name, const std::string &filters) |
void | setParameterFilters (StringParameter *param, const std::string &filters) |
StringParameter * | addStringParameter (const std::string &name, const std::string &description, const std::string &value, Parameter::Presentation p=Parameter::Generic) |
bool | setStringParameter (const std::string &name, const std::string &value, const message::SetParameter *inResponseTo=NULL) |
std::string | getStringParameter (const std::string &name) const |
FloatParameter * | addFloatParameter (const std::string &name, const std::string &description, const Float value) |
bool | setFloatParameter (const std::string &name, const Float value, const message::SetParameter *inResponseTo=NULL) |
Float | getFloatParameter (const std::string &name) const |
IntParameter * | addIntParameter (const std::string &name, const std::string &description, const Integer value, Parameter::Presentation p=Parameter::Generic) |
bool | setIntParameter (const std::string &name, const Integer value, const message::SetParameter *inResponseTo=NULL) |
Integer | getIntParameter (const std::string &name) const |
VectorParameter * | addVectorParameter (const std::string &name, const std::string &description, const ParamVector &value) |
bool | setVectorParameter (const std::string &name, const ParamVector &value, const message::SetParameter *inResponseTo=NULL) |
ParamVector | getVectorParameter (const std::string &name) const |
IntVectorParameter * | addIntVectorParameter (const std::string &name, const std::string &description, const IntParamVector &value) |
bool | setIntVectorParameter (const std::string &name, const IntParamVector &value, const message::SetParameter *inResponseTo=NULL) |
IntParamVector | getIntVectorParameter (const std::string &name) const |
bool | removeParameter (const std::string &name) |
virtual bool | removeParameter (Parameter *param) |
std::shared_ptr< Parameter > | findParameter (const std::string &name) const |
void | init () |
void | quit () |
bool | handleMessage (const message::SetParameter &message) |
virtual void | sendParameterMessage (const message::Message &message, const buffer *payload=nullptr) const =0 |
template<class Payload > | |
void | sendParameterMessageWithPayload (message::Message &message, Payload &payload) |
virtual bool | changeParameters (std::set< const Parameter * > params) |
virtual bool | changeParameter (const Parameter *p) |
void | setId (int id) |
int | id () const |
void | setName (const std::string &name) |
void | applyDelayedChanges () |
vistle::ParameterManager::ParameterManager | ( | const std::string & | name, |
int | id | ||
) |
|
virtual |
FloatParameter * vistle::ParameterManager::addFloatParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const Float | value | ||
) |
IntParameter * vistle::ParameterManager::addIntParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const Integer | value, | ||
Parameter::Presentation | p = Parameter::Generic |
||
) |
IntVectorParameter * vistle::ParameterManager::addIntVectorParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const IntParamVector & | value | ||
) |
Parameter * vistle::ParameterManager::addParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const T & | value, | ||
Parameter::Presentation | presentation = Parameter::Generic |
||
) |
|
virtual |
Reimplemented in vistle::Module.
StringParameter * vistle::ParameterManager::addStringParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const std::string & | value, | ||
Parameter::Presentation | p = Parameter::Generic |
||
) |
VectorParameter * vistle::ParameterManager::addVectorParameter | ( | const std::string & | name, |
const std::string & | description, | ||
const ParamVector & | value | ||
) |
void vistle::ParameterManager::applyDelayedChanges | ( | ) |
|
virtual |
Reimplemented in vistle::Module, and vistle::Reader.
|
virtual |
Reimplemented in vistle::Reader.
const std::string & vistle::ParameterManager::currentParameterGroup | ( | ) | const |
std::shared_ptr< Parameter > vistle::ParameterManager::findParameter | ( | const std::string & | name | ) | const |
Float vistle::ParameterManager::getFloatParameter | ( | const std::string & | name | ) | const |
Integer vistle::ParameterManager::getIntParameter | ( | const std::string & | name | ) | const |
IntParamVector vistle::ParameterManager::getIntVectorParameter | ( | const std::string & | name | ) | const |
bool vistle::ParameterManager::getParameter | ( | const std::string & | name, |
T & | value | ||
) | const |
std::string vistle::ParameterManager::getStringParameter | ( | const std::string & | name | ) | const |
ParamVector vistle::ParameterManager::getVectorParameter | ( | const std::string & | name | ) | const |
bool vistle::ParameterManager::handleMessage | ( | const message::SetParameter & | message | ) |
int vistle::ParameterManager::id | ( | ) | const |
void vistle::ParameterManager::init | ( | ) |
void vistle::ParameterManager::quit | ( | ) |
bool vistle::ParameterManager::removeParameter | ( | const std::string & | name | ) |
|
virtual |
Reimplemented in vistle::Module.
|
pure virtual |
Implemented in vistle::Module.
void vistle::ParameterManager::sendParameterMessageWithPayload | ( | message::Message & | message, |
Payload & | payload | ||
) |
void vistle::ParameterManager::setCurrentParameterGroup | ( | const std::string & | group = std::string() | ) |
set group for all subsequently added parameters, reset with empty group
bool vistle::ParameterManager::setFloatParameter | ( | const std::string & | name, |
const Float | value, | ||
const message::SetParameter * | inResponseTo = NULL |
||
) |
void vistle::ParameterManager::setId | ( | int | id | ) |
bool vistle::ParameterManager::setIntParameter | ( | const std::string & | name, |
const Integer | value, | ||
const message::SetParameter * | inResponseTo = NULL |
||
) |
bool vistle::ParameterManager::setIntVectorParameter | ( | const std::string & | name, |
const IntParamVector & | value, | ||
const message::SetParameter * | inResponseTo = NULL |
||
) |
void vistle::ParameterManager::setName | ( | const std::string & | name | ) |
bool vistle::ParameterManager::setParameter | ( | const std::string & | name, |
const T & | value, | ||
const message::SetParameter * | inResponseTo = nullptr |
||
) |
bool vistle::ParameterManager::setParameter | ( | ParameterBase< T > * | param, |
const T & | value, | ||
const message::SetParameter * | inResponseTo = nullptr |
||
) |
void vistle::ParameterManager::setParameterChoices | ( | const std::string & | name, |
const std::vector< std::string > & | choices | ||
) |
void vistle::ParameterManager::setParameterChoices | ( | Parameter * | param, |
const std::vector< std::string > & | choices | ||
) |
void vistle::ParameterManager::setParameterFilters | ( | const std::string & | name, |
const std::string & | filters | ||
) |
void vistle::ParameterManager::setParameterFilters | ( | StringParameter * | param, |
const std::string & | filters | ||
) |
bool vistle::ParameterManager::setParameterMaximum | ( | ParameterBase< T > * | param, |
const T & | maximum | ||
) |
bool vistle::ParameterManager::setParameterMinimum | ( | ParameterBase< T > * | param, |
const T & | minimum | ||
) |
bool vistle::ParameterManager::setParameterRange | ( | const std::string & | name, |
const T & | minimum, | ||
const T & | maximum | ||
) |
bool vistle::ParameterManager::setParameterRange | ( | ParameterBase< T > * | param, |
const T & | minimum, | ||
const T & | maximum | ||
) |
bool vistle::ParameterManager::setStringParameter | ( | const std::string & | name, |
const std::string & | value, | ||
const message::SetParameter * | inResponseTo = NULL |
||
) |
bool vistle::ParameterManager::setVectorParameter | ( | const std::string & | name, |
const ParamVector & | value, | ||
const message::SetParameter * | inResponseTo = NULL |
||
) |
bool vistle::ParameterManager::updateParameter | ( | const std::string & | name, |
const Parameter * | parameter, | ||
const message::SetParameter * | inResponseTo, | ||
Parameter::RangeType | rt = Parameter::Value |
||
) |