TuttleOFX
1
|
#include <OfxhParamSet.hpp>
Public Types | |
typedef OfxhParamSet | This |
typedef std::map< std::string, OfxhParam * > | ParamMap |
typedef boost::ptr_vector < OfxhParam > | ParamVector |
Public Member Functions | |
OfxhParamSet () | |
OfxhParamSet (const OfxhParamSet &other) | |
virtual | ~OfxhParamSet ()=0 |
void | operator= (const OfxhParamSet &other) |
void | copyParamsValues (const OfxhParamSet &other) |
bool | operator== (const This &other) const |
bool | operator!= (const This &other) const |
std::size_t | getHashAtTime (const OfxTime time) const |
OfxParamSetHandle | getParamSetHandle () const |
obtain a handle on this set for passing to the C api | |
const ParamMap & | getParamsByName () const |
ParamMap & | getParamsByName () |
const ParamMap & | getParamsByScriptName () const |
ParamMap & | getParamsByScriptName () |
const ParamVector & | getParamVector () const |
ParamVector & | getParamVector () |
std::size_t | getNbParams () const |
OfxhParam & | getParam (const std::string &name) |
const OfxhParam & | getParam (const std::string &name) const |
OfxhParam & | getParamByScriptName (const std::string &scriptName, const bool acceptPartialName=false) |
const OfxhParam & | getParamByScriptName (const std::string &name, const bool acceptPartialName=false) const |
OfxhParam * | getParamPtrByScriptName (const std::string &name, const bool acceptPartialName=false) |
const OfxhParam * | getParamPtrByScriptName (const std::string &name, const bool acceptPartialName=false) const |
OfxhParam & | getParam (const std::size_t index) |
const OfxhParam & | getParam (const std::size_t index) const |
virtual void | paramChanged (const attribute::OfxhParam ¶m, const EChange change)=0 |
virtual void | editBegin (const std::string &name) OFX_EXCEPTION_SPEC=0 |
virtual void | editEnd () OFX_EXCEPTION_SPEC=0 |
Protected Member Functions | |
virtual void | addParam (OfxhParam *instance) OFX_EXCEPTION_SPEC |
reference a param | |
virtual OfxhParam * | newParam (const OfxhParamDescriptor &Descriptor) OFX_EXCEPTION_SPEC=0 |
void | reserveParameters (const std::size_t size) |
Protected Attributes | |
ParamMap | _params |
params by name | |
ParamMap | _paramsByScriptName |
params by script name | |
ParamVector | _paramVector |
params list | |
Private Member Functions | |
void | initMapFromList () |
A set of parameters
As we are the owning object we delete the params inside ourselves. It was tempting to make params autoref objects and have shared ownership with the client code but that adds complexity for no strong gain.
Definition at line 24 of file OfxhParamSet.hpp.
typedef std::map<std::string, OfxhParam*> tuttle::host::ofx::attribute::OfxhParamSet::ParamMap |
Definition at line 30 of file OfxhParamSet.hpp.
typedef boost::ptr_vector<OfxhParam> tuttle::host::ofx::attribute::OfxhParamSet::ParamVector |
Definition at line 31 of file OfxhParamSet.hpp.
Reimplemented in tuttle::host::ofx::imageEffect::OfxhImageEffectNode, and tuttle::host::ImageEffectNode.
Definition at line 29 of file OfxhParamSet.hpp.
tuttle::host::ofx::attribute::OfxhParamSet::OfxhParamSet | ( | ) | [explicit] |
The propery set being passed in belongs to the owning plugin instance.
Definition at line 15 of file OfxhParamSet.cpp.
tuttle::host::ofx::attribute::OfxhParamSet::OfxhParamSet | ( | const OfxhParamSet & | other | ) | [explicit] |
Definition at line 18 of file OfxhParamSet.cpp.
References operator=().
tuttle::host::ofx::attribute::OfxhParamSet::~OfxhParamSet | ( | ) | [pure virtual] |
Definition at line 32 of file OfxhParamSet.cpp.
void tuttle::host::ofx::attribute::OfxhParamSet::addParam | ( | OfxhParam * | instance | ) | [protected, virtual] |
reference a param
add a param
Definition at line 170 of file OfxhParamSet.cpp.
References kOfxStatErrExists.
void tuttle::host::ofx::attribute::OfxhParamSet::copyParamsValues | ( | const OfxhParamSet & | other | ) |
Definition at line 41 of file OfxhParamSet.cpp.
References _paramVector, tuttle::host::ofx::attribute::OfxhParam::copy(), tuttle::host::ofx::attribute::OfxhAttributeAccessor::getName(), and initMapFromList().
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::copyAttributesValues().
virtual void tuttle::host::ofx::attribute::OfxhParamSet::editBegin | ( | const std::string & | name | ) | [pure virtual] |
Triggered when the plug-in calls OfxParameterSuiteV1::paramEditBegin
Client host code needs to implement this
Implemented in tuttle::host::ImageEffectNode, and tuttle::host::ofx::attribute::OfxhParamGroup.
Referenced by tuttle::host::ofx::attribute::OfxhParamGroup::editBegin().
virtual void tuttle::host::ofx::attribute::OfxhParamSet::editEnd | ( | ) | [pure virtual] |
Triggered when the plug-in calls OfxParameterSuiteV1::paramEditEnd
Client host code needs to implement this
Implemented in tuttle::host::ImageEffectNode, and tuttle::host::ofx::attribute::OfxhParamGroup.
Referenced by tuttle::host::ofx::attribute::OfxhParamGroup::editEnd().
std::size_t tuttle::host::ofx::attribute::OfxhParamSet::getHashAtTime | ( | const OfxTime | time | ) | const |
Reimplemented in tuttle::host::ofx::attribute::OfxhParamGroup.
Definition at line 66 of file OfxhParamSet.cpp.
References tuttle::host::ofx::attribute::OfxhParamAccessor::getEvaluateOnChange(), tuttle::host::ofx::attribute::OfxhParam::getHashAtTime(), getParamVector(), and tuttle::host::ofx::attribute::OfxhParam::paramTypeHasData().
Referenced by tuttle::host::ImageEffectNode::getLocalHashAtTime().
std::size_t tuttle::host::ofx::attribute::OfxhParamSet::getNbParams | ( | ) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 69 of file OfxhParamSet.hpp.
References _params.
OfxhParam & tuttle::host::ofx::attribute::OfxhParamSet::getParam | ( | const std::string & | name | ) |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 89 of file OfxhParamSet.cpp.
References _params.
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::calcDefaultRegionOfDefinition(), and tuttle::host::ofx::attribute::OfxhParamPage::getChildren().
const OfxhParam& tuttle::host::ofx::attribute::OfxhParamSet::getParam | ( | const std::string & | name | ) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 72 of file OfxhParamSet.hpp.
References getParam().
Referenced by getParam().
OfxhParam & tuttle::host::ofx::attribute::OfxhParamSet::getParam | ( | const std::size_t | index | ) |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 159 of file OfxhParamSet.cpp.
References _paramVector.
const OfxhParam& tuttle::host::ofx::attribute::OfxhParamSet::getParam | ( | const std::size_t | index | ) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 81 of file OfxhParamSet.hpp.
References getParam().
Referenced by getParam().
OfxhParam & tuttle::host::ofx::attribute::OfxhParamSet::getParamByScriptName | ( | const std::string & | scriptName, |
const bool | acceptPartialName = false |
||
) |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 101 of file OfxhParamSet.cpp.
References _paramsByScriptName.
Referenced by getParamPtrByScriptName().
const OfxhParam& tuttle::host::ofx::attribute::OfxhParamSet::getParamByScriptName | ( | const std::string & | name, |
const bool | acceptPartialName = false |
||
) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 75 of file OfxhParamSet.hpp.
References getParamByScriptName().
Referenced by getParamByScriptName().
OfxhParam * tuttle::host::ofx::attribute::OfxhParamSet::getParamPtrByScriptName | ( | const std::string & | name, |
const bool | acceptPartialName = false |
||
) |
Definition at line 135 of file OfxhParamSet.cpp.
References getParamByScriptName().
const OfxhParam * tuttle::host::ofx::attribute::OfxhParamSet::getParamPtrByScriptName | ( | const std::string & | name, |
const bool | acceptPartialName = false |
||
) | const |
Definition at line 146 of file OfxhParamSet.cpp.
References getParamByScriptName().
const ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByName | ( | ) | const [inline] |
Definition at line 60 of file OfxhParamSet.hpp.
References _params.
ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByName | ( | ) | [inline] |
Definition at line 61 of file OfxhParamSet.hpp.
References _params.
const ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByScriptName | ( | ) | const [inline] |
Definition at line 63 of file OfxhParamSet.hpp.
References _paramsByScriptName.
ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByScriptName | ( | ) | [inline] |
Definition at line 64 of file OfxhParamSet.hpp.
References _paramsByScriptName.
OfxParamSetHandle tuttle::host::ofx::attribute::OfxhParamSet::getParamSetHandle | ( | ) | const [inline, virtual] |
obtain a handle on this set for passing to the C api
Implements tuttle::host::ofx::attribute::OfxhParamSetAccessor.
Definition at line 58 of file OfxhParamSet.hpp.
const ParamVector& tuttle::host::ofx::attribute::OfxhParamSet::getParamVector | ( | ) | const [inline] |
Definition at line 66 of file OfxhParamSet.hpp.
References _paramVector.
Referenced by getHashAtTime(), and tuttle::host::ofx::attribute::OfxhParamGroup::setChildrens().
ParamVector& tuttle::host::ofx::attribute::OfxhParamSet::getParamVector | ( | ) | [inline] |
Definition at line 67 of file OfxhParamSet.hpp.
References _paramVector.
void tuttle::host::ofx::attribute::OfxhParamSet::initMapFromList | ( | ) | [private] |
Definition at line 23 of file OfxhParamSet.cpp.
References _params, _paramsByScriptName, _paramVector, tuttle::host::ofx::attribute::OfxhAttributeAccessor::getName(), and tuttle::host::ofx::attribute::OfxhParamAccessor::getScriptName().
Referenced by copyParamsValues(), and operator=().
virtual OfxhParam* tuttle::host::ofx::attribute::OfxhParamSet::newParam | ( | const OfxhParamDescriptor & | Descriptor | ) | [protected, pure virtual] |
make a parameter instance
Client host code needs to implement this
Implemented in tuttle::host::ImageEffectNode, and tuttle::host::ofx::attribute::OfxhParamGroup.
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::populateParams().
bool tuttle::host::ofx::attribute::OfxhParamSet::operator!= | ( | const This & | other | ) | const [inline] |
Definition at line 53 of file OfxhParamSet.hpp.
References operator==().
void tuttle::host::ofx::attribute::OfxhParamSet::operator= | ( | const OfxhParamSet & | other | ) |
Definition at line 35 of file OfxhParamSet.cpp.
References _paramVector, and initMapFromList().
Referenced by OfxhParamSet().
bool tuttle::host::ofx::attribute::OfxhParamSet::operator== | ( | const This & | other | ) | const [inline] |
Definition at line 51 of file OfxhParamSet.hpp.
References _paramVector.
Referenced by operator!=().
virtual void tuttle::host::ofx::attribute::OfxhParamSet::paramChanged | ( | const attribute::OfxhParam & | param, |
const EChange | change | ||
) | [pure virtual] |
The inheriting plugin instance needs to set this up to deal with plug-ins changing their own values.
Implemented in tuttle::host::ofx::imageEffect::OfxhImageEffectNode, and tuttle::host::ofx::attribute::OfxhParamGroup.
Referenced by tuttle::host::ofx::attribute::OfxhParamGroup::paramChanged(), and tuttle::host::ofx::attribute::OfxhParam::paramChanged().
void tuttle::host::ofx::attribute::OfxhParamSet::reserveParameters | ( | const std::size_t | size | ) | [inline, protected] |
Definition at line 110 of file OfxhParamSet.hpp.
References _paramVector.
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::populateParams().
params by name
Definition at line 34 of file OfxhParamSet.hpp.
Referenced by getNbParams(), getParam(), getParamsByName(), and initMapFromList().
params by script name
Definition at line 35 of file OfxhParamSet.hpp.
Referenced by getParamByScriptName(), getParamsByScriptName(), and initMapFromList().
params list
Definition at line 36 of file OfxhParamSet.hpp.
Referenced by tuttle::host::ofx::attribute::OfxhParamGroup::addChildren(), copyParamsValues(), tuttle::host::ofx::attribute::OfxhParamGroup::deleteChildrens(), getParam(), getParamVector(), initMapFromList(), operator=(), operator==(), tuttle::host::ImageEffectNode::print(), reserveParameters(), and tuttle::host::ofx::attribute::OfxhParamGroup::setChildrens().