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 |
OfxhParamSet & | 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 & | getChildParamsByName () const |
ParamMap & | getChildParamsByName () |
const ParamMap & | getParamsByScriptName () const |
ParamMap & | getParamsByScriptName () |
const ParamVector & | getParamVector () const |
ParamVector & | getParamVector () |
const std::vector< OfxhParam * > & | getChildParamVector () const |
std::vector< OfxhParam * > & | getChildParamVector () |
std::size_t | getNbParams () const |
std::size_t | getNbChildParams () 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 |
OfxhParam & | getChildParam (const std::size_t index) |
const OfxhParam & | getChildParam (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 |
void | declareChildParam (OfxhParam &childParam) |
reference a param | |
Protected Member Functions | |
virtual void | addParam (OfxhParam *instance) OFX_EXCEPTION_SPEC |
add a param | |
void | reserveParameters (const std::size_t size) |
Protected Attributes | |
ParamMap | _params |
params by name | |
ParamMap | _paramsByScriptName |
params by script name | |
ParamVector | _paramVector |
params list | |
ParamMap | _childParams |
child params by name | |
std::vector< OfxhParam * > | _childParamVector |
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] |
add a param
Definition at line 182 of file OfxhParamSet.cpp.
void tuttle::host::ofx::attribute::OfxhParamSet::copyParamsValues | ( | const OfxhParamSet & | other | ) |
Definition at line 42 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().
void tuttle::host::ofx::attribute::OfxhParamSet::declareChildParam | ( | OfxhParam & | childParam | ) |
reference a param
Definition at line 194 of file OfxhParamSet.cpp.
References _childParams, _childParamVector, tuttle::host::ofx::attribute::OfxhAttributeAccessor::getName(), and tuttle::host::ofx::attribute::OfxhParam::setParamSetInstance().
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::populateParams().
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().
OfxhParam & tuttle::host::ofx::attribute::OfxhParamSet::getChildParam | ( | const std::size_t | index | ) |
Definition at line 171 of file OfxhParamSet.cpp.
References _childParamVector, and _paramVector.
const OfxhParam& tuttle::host::ofx::attribute::OfxhParamSet::getChildParam | ( | const std::size_t | index | ) | const [inline] |
Definition at line 96 of file OfxhParamSet.hpp.
References getChildParam().
Referenced by getChildParam().
const ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getChildParamsByName | ( | ) | const [inline] |
Definition at line 69 of file OfxhParamSet.hpp.
References _childParams.
ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getChildParamsByName | ( | ) | [inline] |
Definition at line 70 of file OfxhParamSet.hpp.
References _childParams.
const std::vector<OfxhParam*>& tuttle::host::ofx::attribute::OfxhParamSet::getChildParamVector | ( | ) | const [inline] |
Definition at line 78 of file OfxhParamSet.hpp.
References _childParamVector.
std::vector<OfxhParam*>& tuttle::host::ofx::attribute::OfxhParamSet::getChildParamVector | ( | ) | [inline] |
Definition at line 79 of file OfxhParamSet.hpp.
References _childParamVector.
std::size_t tuttle::host::ofx::attribute::OfxhParamSet::getHashAtTime | ( | const OfxTime | time | ) | const |
Reimplemented in tuttle::host::ofx::attribute::OfxhParamGroup.
Definition at line 67 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::getNbChildParams | ( | ) | const [inline] |
Definition at line 82 of file OfxhParamSet.hpp.
References _childParams.
std::size_t tuttle::host::ofx::attribute::OfxhParamSet::getNbParams | ( | ) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 81 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 90 of file OfxhParamSet.cpp.
References _params.
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::calcDefaultRegionOfDefinition(), tuttle::host::ofx::attribute::OfxhParamPage::getChildren(), and tuttle::host::ofx::imageEffect::OfxhImageEffectNode::populateParams().
const OfxhParam& tuttle::host::ofx::attribute::OfxhParamSet::getParam | ( | const std::string & | name | ) | const [inline] |
Reimplemented in tuttle::host::ImageEffectNode.
Definition at line 85 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 160 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 94 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 102 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 88 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 136 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 147 of file OfxhParamSet.cpp.
References getParamByScriptName().
const ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByName | ( | ) | const [inline] |
Definition at line 66 of file OfxhParamSet.hpp.
References _params.
ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByName | ( | ) | [inline] |
Definition at line 67 of file OfxhParamSet.hpp.
References _params.
const ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByScriptName | ( | ) | const [inline] |
Definition at line 72 of file OfxhParamSet.hpp.
References _paramsByScriptName.
ParamMap& tuttle::host::ofx::attribute::OfxhParamSet::getParamsByScriptName | ( | ) | [inline] |
Definition at line 73 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 64 of file OfxhParamSet.hpp.
const ParamVector& tuttle::host::ofx::attribute::OfxhParamSet::getParamVector | ( | ) | const [inline] |
Definition at line 75 of file OfxhParamSet.hpp.
References _paramVector.
Referenced by getHashAtTime().
ParamVector& tuttle::host::ofx::attribute::OfxhParamSet::getParamVector | ( | ) | [inline] |
Definition at line 76 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=().
bool tuttle::host::ofx::attribute::OfxhParamSet::operator!= | ( | const This & | other | ) | const [inline] |
Definition at line 59 of file OfxhParamSet.hpp.
References operator==().
OfxhParamSet & 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 57 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 121 of file OfxhParamSet.hpp.
References _paramVector.
Referenced by tuttle::host::ofx::imageEffect::OfxhImageEffectNode::populateParams().
child params by name
Link to child parameters (no ownership)
Definition at line 40 of file OfxhParamSet.hpp.
Referenced by declareChildParam(), getChildParamsByName(), and getNbChildParams().
std::vector<OfxhParam*> tuttle::host::ofx::attribute::OfxhParamSet::_childParamVector [protected] |
child params list
Definition at line 41 of file OfxhParamSet.hpp.
Referenced by declareChildParam(), getChildParam(), and getChildParamVector().
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 copyParamsValues(), getChildParam(), getParam(), getParamVector(), initMapFromList(), operator=(), operator==(), tuttle::host::ImageEffectNode::print(), and reserveParameters().