TuttleOFX  1
OFX::PropertySet Class Reference

This class wraps up an OFX property set. More...

#include <ofxsCore.h>

Public Member Functions

 PropertySet (OfxPropertySetHandle h=0)
 construct a property set
virtual ~PropertySet ()
 Virtual destructor.
void propSetHandle (OfxPropertySetHandle h)
 set the handle to use for this set
OfxPropertySetHandle propSetHandle (void)
 return the handle for this property set
int propGetDimension (const std::string &property, bool throwOnFailure=true) const
int propGetDimension (const char *property, bool throwOnFailure=true) const
 , returns the dimension of the given property from this property set
void propReset (const char *property)
 , resets the property to it's default value
void propSetPointer (const char *property, void *value, int idx, bool throwOnFailure=true)
 , Set a single dimension pointer property
void propSetString (const char *property, const std::string &value, int idx, bool throwOnFailure=true)
 , Set a single dimension string property
void propSetDouble (const char *property, double value, int idx, bool throwOnFailure=true)
 , Set a single dimension double property
void propSetInt (const char *property, int value, int idx, bool throwOnFailure=true)
 , Set a single dimension int property
void propSetPointer (const char *property, void *value, bool throwOnFailure=true)
void propSetString (const char *property, const std::string &value, bool throwOnFailure=true)
void propSetDouble (const char *property, double value, bool throwOnFailure=true)
void propSetInt (const char *property, int value, bool throwOnFailure=true)
void * propGetPointer (const char *property, int idx, bool throwOnFailure=true) const
 get a pointer property
std::string propGetString (const char *property, int idx, bool throwOnFailure=true) const
 get a string property
double propGetDouble (const char *property, int idx, bool throwOnFailure=true) const
 get a double property
int propGetInt (const char *property, int idx, bool throwOnFailure=true) const
 get an int property
void * propGetPointer (const std::string &property, bool throwOnFailure=true) const
 get a string property with index 0
void * propGetPointer (const char *property, bool throwOnFailure=true) const
std::string propGetString (const std::string &property, bool throwOnFailure=true) const
 get a string property with index 0
std::string propGetString (const char *property, bool throwOnFailure=true) const
double propGetDouble (const std::string &property, bool throwOnFailure=true) const
 get a double property with index 0
double propGetDouble (const char *property, bool throwOnFailure=true) const
int propGetInt (const std::string &property, bool throwOnFailure=true) const
 get an int property with index 0
int propGetInt (const char *property, bool throwOnFailure=true) const

Static Public Member Functions

static void propEnableLogging (void)
 turns on logging of property access functions
static void propDisableLogging (void)
 turns off logging of property access functions
static void setThrowOnUnsupportedProperties (bool v)
 Do we throw an exception if a host returns 'unsupported' when setting a property. Default is true.
static bool getThrowOnUnsupportedProperties (void)
 Do we throw an exception if a host returns 'unsupported' when setting a property. Default is true.

Protected Attributes

OfxPropertySetHandle _propHandle
 The raw property handle.

Static Protected Attributes

static int _gPropLogging = 1
 Class static, whether we are logging each property action.
static bool _gThrowOnUnsupported = true
 Do not throw an exception if a host returns 'unsupported' when setting a property.

Detailed Description

This class wraps up an OFX property set.

Definition at line 302 of file ofxsCore.h.


Constructor & Destructor Documentation

OFX::PropertySet::PropertySet ( OfxPropertySetHandle  h = 0) [inline]

construct a property set

Definition at line 328 of file ofxsCore.h.

OFX::PropertySet::~PropertySet ( ) [virtual]

Virtual destructor.

Definition at line 86 of file ofxsProperty.cpp.


Member Function Documentation

static bool OFX::PropertySet::getThrowOnUnsupportedProperties ( void  ) [inline, static]

Do we throw an exception if a host returns 'unsupported' when setting a property. Default is true.

Definition at line 325 of file ofxsCore.h.

References _gThrowOnUnsupported.

Referenced by OFX::throwPropertyException().

static void OFX::PropertySet::propDisableLogging ( void  ) [inline, static]

turns off logging of property access functions

Definition at line 319 of file ofxsCore.h.

References _gPropLogging.

Referenced by OFX::Validation::PropertySetDescription::validate().

static void OFX::PropertySet::propEnableLogging ( void  ) [inline, static]

turns on logging of property access functions

Definition at line 316 of file ofxsCore.h.

References _gPropLogging.

Referenced by OFX::Validation::PropertySetDescription::validate().

int OFX::PropertySet::propGetDimension ( const char *  property,
bool  throwOnFailure = true 
) const

, returns the dimension of the given property from this property set

Definition at line 89 of file ofxsProperty.cpp.

References OFX::Log::error(), OFX::Private::gPropSuite, kOfxStatOK, OFX::mapStatusToString(), OFX::Log::print(), OfxPropertySuiteV1::propGetDimension, and OFX::throwPropertyException().

Here is the call graph for this function:

double OFX::PropertySet::propGetDouble ( const char *  property,
int  idx,
bool  throwOnFailure = true 
) const

get a double property

Get single double property.

Definition at line 210 of file ofxsProperty.cpp.

References OFX::Log::error(), OFX::Private::gPropSuite, kOfxStatOK, OFX::mapStatusToString(), OFX::Log::print(), OfxPropertySuiteV1::propGetDouble, and OFX::throwPropertyException().

Referenced by OFX::Private::beginSequenceRenderAction(), OFX::Private::endSequenceRenderAction(), OFX::Private::framesNeededAction(), OFX::getBackgroundColour(), OFX::DoubleParam::getDefault(), OFX::Double2DParam::getDefault(), OFX::Double3DParam::getDefault(), OFX::RGBParam::getDefault(), OFX::RGBAParam::getDefault(), OFX::DoubleParam::getDisplayRange(), OFX::Double2DParam::getDisplayRange(), OFX::Double3DParam::getDisplayRange(), OFX::ImageEffect::getEffectDuration(), OFX::Clip::getFrameRange(), OFX::Clip::getFrameRate(), OFX::ImageEffect::getFrameRate(), OFX::BaseDoubleParam::getIncrement(), OFX::Clip::getPixelAspectRatio(), OFX::getPixelScale(), OFX::Interact::getPixelScale(), OFX::ImageEffect::getProjectExtent(), OFX::ImageEffect::getProjectOffset(), OFX::ImageEffect::getProjectPixelAspectRatio(), OFX::ImageEffect::getProjectSize(), OFX::DoubleParam::getRange(), OFX::Double2DParam::getRange(), OFX::Double3DParam::getRange(), OFX::Private::getRenderActionArguments(), OFX::getRenderScale(), OFX::Private::getTimeDomainAction(), OFX::Clip::getUnmappedFrameRange(), OFX::Clip::getUnmappedFrameRate(), OFX::Image::Image(), OFX::Private::instanceChangedAction(), OFX::InteractArgs::InteractArgs(), OFX::KeyArgs::KeyArgs(), OFX::PenArgs::PenArgs(), propGetDouble(), OFX::Private::regionOfDefinitionAction(), OFX::Private::regionsOfInterestAction(), and OFX::Validation::PropertyDescription::validate().

Here is the call graph for this function:

double OFX::PropertySet::propGetDouble ( const std::string &  property,
bool  throwOnFailure = true 
) const [inline]

get a double property with index 0

Definition at line 398 of file ofxsCore.h.

References propGetDouble().

Here is the call graph for this function:

double OFX::PropertySet::propGetDouble ( const char *  property,
bool  throwOnFailure = true 
) const [inline]

Definition at line 403 of file ofxsCore.h.

References propGetDouble().

Here is the call graph for this function:

int OFX::PropertySet::propGetInt ( const char *  property,
int  idx,
bool  throwOnFailure = true 
) const
int OFX::PropertySet::propGetInt ( const std::string &  property,
bool  throwOnFailure = true 
) const [inline]

get an int property with index 0

Definition at line 409 of file ofxsCore.h.

References propGetInt().

Here is the call graph for this function:

int OFX::PropertySet::propGetInt ( const char *  property,
bool  throwOnFailure = true 
) const [inline]

Definition at line 414 of file ofxsCore.h.

References propGetInt().

Here is the call graph for this function:

void * OFX::PropertySet::propGetPointer ( const char *  property,
int  idx,
bool  throwOnFailure = true 
) const
void* OFX::PropertySet::propGetPointer ( const std::string &  property,
bool  throwOnFailure = true 
) const [inline]

get a string property with index 0

Definition at line 376 of file ofxsCore.h.

References propGetPointer().

Here is the call graph for this function:

void* OFX::PropertySet::propGetPointer ( const char *  property,
bool  throwOnFailure = true 
) const [inline]

Definition at line 381 of file ofxsCore.h.

References propGetPointer().

Here is the call graph for this function:

std::string OFX::PropertySet::propGetString ( const char *  property,
int  idx,
bool  throwOnFailure = true 
) const
std::string OFX::PropertySet::propGetString ( const std::string &  property,
bool  throwOnFailure = true 
) const [inline]

get a string property with index 0

Definition at line 387 of file ofxsCore.h.

References propGetString().

Here is the call graph for this function:

std::string OFX::PropertySet::propGetString ( const char *  property,
bool  throwOnFailure = true 
) const [inline]

Definition at line 392 of file ofxsCore.h.

References propGetString().

Here is the call graph for this function:

void OFX::PropertySet::propReset ( const char *  property)
void OFX::PropertySet::propSetDouble ( const char *  property,
double  value,
int  idx,
bool  throwOnFailure = true 
)

, Set a single dimension double property

Definition at line 145 of file ofxsProperty.cpp.

References OFX::Log::error(), OFX::Private::gPropSuite, kOfxStatOK, OFX::mapStatusToString(), OFX::Log::print(), OfxPropertySuiteV1::propSetDouble, and OFX::throwPropertyException().

Referenced by OFX::Private::getTimeDomainAction(), OFX::Private::isIdentityAction(), OFX::Private::regionOfDefinitionAction(), OFX::DoubleParamDescriptor::setDefault(), OFX::Double2DParamDescriptor::setDefault(), OFX::Double3DParamDescriptor::setDefault(), OFX::RGBParamDescriptor::setDefault(), OFX::RGBAParamDescriptor::setDefault(), OFX::DoubleParam::setDefault(), OFX::Double2DParam::setDefault(), OFX::Double3DParam::setDefault(), OFX::RGBParam::setDefault(), OFX::RGBAParam::setDefault(), OFX::DoubleParamDescriptor::setDisplayRange(), OFX::Double2DParamDescriptor::setDisplayRange(), OFX::Double3DParamDescriptor::setDisplayRange(), OFX::DoubleParam::setDisplayRange(), OFX::Double2DParam::setDisplayRange(), OFX::Double3DParam::setDisplayRange(), OFX::BaseDoubleParamDescriptor::setIncrement(), OFX::BaseDoubleParam::setIncrement(), OFX::ParamInteractDescriptor::setInteractSizeAspect(), OFX::ClipPreferencesSetter::setOutputFrameRate(), OFX::ClipPreferencesSetter::setPixelAspectRatio(), OFX::DoubleParamDescriptor::setRange(), OFX::Double2DParamDescriptor::setRange(), OFX::Double3DParamDescriptor::setRange(), OFX::ParametricParamDescriptor::setRange(), OFX::DoubleParam::setRange(), OFX::Double2DParam::setRange(), OFX::Double3DParam::setRange(), and OFX::ParametricParamDescriptor::setUIColour().

Here is the call graph for this function:

void OFX::PropertySet::propSetDouble ( const char *  property,
double  value,
bool  throwOnFailure = true 
) [inline]

Definition at line 358 of file ofxsCore.h.

References propSetDouble().

Referenced by propSetDouble().

Here is the call graph for this function:

void OFX::PropertySet::propSetHandle ( OfxPropertySetHandle  h) [inline]
OfxPropertySetHandle OFX::PropertySet::propSetHandle ( void  ) [inline]

return the handle for this property set

Definition at line 335 of file ofxsCore.h.

References _propHandle.

void OFX::PropertySet::propSetInt ( const char *  property,
int  value,
int  idx,
bool  throwOnFailure = true 
)

, Set a single dimension int property

Definition at line 159 of file ofxsProperty.cpp.

References OFX::Log::error(), OFX::Private::gPropSuite, kOfxStatOK, OFX::mapStatusToString(), OFX::Log::print(), OfxPropertySuiteV1::propSetInt, and OFX::throwPropertyException().

Referenced by OFX::ValueParamDescriptor::setAnimates(), OFX::GroupParamDescriptor::setAsTab(), OFX::ValueParamDescriptor::setCanUndo(), OFX::IntParamDescriptor::setDefault(), OFX::Int2DParamDescriptor::setDefault(), OFX::Int3DParamDescriptor::setDefault(), OFX::BooleanParamDescriptor::setDefault(), OFX::ChoiceParamDescriptor::setDefault(), OFX::IntParam::setDefault(), OFX::Int2DParam::setDefault(), OFX::Int3DParam::setDefault(), OFX::ChoiceParam::setDefault(), OFX::BooleanParam::setDefault(), OFX::BaseDoubleParamDescriptor::setDigits(), OFX::BaseDoubleParam::setDigits(), OFX::ParametricParamDescriptor::setDimension(), OFX::IntParamDescriptor::setDisplayRange(), OFX::Int2DParamDescriptor::setDisplayRange(), OFX::Int3DParamDescriptor::setDisplayRange(), OFX::IntParam::setDisplayRange(), OFX::Int2DParam::setDisplayRange(), OFX::Int3DParam::setDisplayRange(), OFX::ParamDescriptor::setEnabled(), OFX::Param::setEnabled(), OFX::ValueParamDescriptor::setEvaluateOnChange(), OFX::ValueParam::setEvaluateOnChange(), OFX::StringParamDescriptor::setFilePathExists(), OFX::ImageEffectDescriptor::setHostFrameThreading(), OFX::ParamInteractDescriptor::setInteractMinimumSize(), OFX::ParamInteractDescriptor::setInteractPreferredSize(), OFX::ClipDescriptor::setIsMask(), OFX::ValueParamDescriptor::setIsPersistant(), OFX::ParamDescriptor::setIsSecret(), OFX::Param::setIsSecret(), OFX::ParamDescriptor::setLayoutHint(), OFX::GroupParamDescriptor::setOpen(), OFX::ClipDescriptor::setOptional(), OFX::ClipPreferencesSetter::setOutputFrameVarying(), OFX::ClipPreferencesSetter::setOutputHasContinousSamples(), OFX::IntParamDescriptor::setRange(), OFX::Int2DParamDescriptor::setRange(), OFX::Int3DParamDescriptor::setRange(), OFX::IntParam::setRange(), OFX::Int2DParam::setRange(), OFX::Int3DParam::setRange(), OFX::ImageEffectDescriptor::setRenderTwiceAlways(), OFX::ImageEffect::setSequentialRender(), OFX::ImageEffectDescriptor::setSingleInstance(), OFX::ImageEffectDescriptor::setSupportsMultipleClipDepths(), OFX::ImageEffectDescriptor::setSupportsMultipleClipPARs(), OFX::ImageEffectDescriptor::setSupportsMultiResolution(), OFX::ClipDescriptor::setSupportsTiles(), OFX::ImageEffectDescriptor::setSupportsTiles(), OFX::ClipDescriptor::setTemporalClipAccess(), and OFX::ImageEffectDescriptor::setTemporalClipAccess().

Here is the call graph for this function:

void OFX::PropertySet::propSetInt ( const char *  property,
int  value,
bool  throwOnFailure = true 
) [inline]

Definition at line 361 of file ofxsCore.h.

References propSetInt().

Referenced by propSetInt().

Here is the call graph for this function:

void OFX::PropertySet::propSetPointer ( const char *  property,
void *  value,
int  idx,
bool  throwOnFailure = true 
)
void OFX::PropertySet::propSetPointer ( const char *  property,
void *  value,
bool  throwOnFailure = true 
) [inline]

Definition at line 352 of file ofxsCore.h.

References propSetPointer().

Referenced by propSetPointer().

Here is the call graph for this function:

void OFX::PropertySet::propSetString ( const char *  property,
const std::string &  value,
int  idx,
bool  throwOnFailure = true 
)

, Set a single dimension string property

Definition at line 131 of file ofxsProperty.cpp.

References OFX::Log::error(), OFX::Private::gPropSuite, kOfxStatOK, OFX::mapStatusToString(), OFX::Log::print(), OfxPropertySuiteV1::propSetString, and OFX::throwPropertyException().

Referenced by OFX::PageParamDescriptor::addChild(), OFX::ImageEffectDescriptor::addClipPreferencesSlaveParam(), OFX::Interact::addParamToSlaveTo(), OFX::ImageEffectDescriptor::addSupportedBitDepth(), OFX::ClipDescriptor::addSupportedComponent(), OFX::ImageEffectDescriptor::addSupportedContext(), OFX::ImageEffectDescriptor::addSupportedExtension(), OFX::ImageEffectDescriptor::addSupportedExtensions(), OFX::ChoiceParamDescriptor::appendOption(), OFX::ChoiceParam::appendOption(), OFX::Private::isIdentityAction(), OFX::Interact::removeParamToSlaveTo(), OFX::ValueParamDescriptor::setCacheInvalidation(), OFX::ClipPreferencesSetter::setClipBitDepth(), OFX::ClipPreferencesSetter::setClipComponents(), OFX::StringParamDescriptor::setDefault(), OFX::CustomParamDescriptor::setDefault(), OFX::StringParam::setDefault(), OFX::CustomParam::setDefault(), OFX::ImageEffectDescriptor::setDescription(), OFX::ParametricParamDescriptor::setDimensionLabel(), OFX::Int2DParamDescriptor::setDimensionLabels(), OFX::Int3DParamDescriptor::setDimensionLabels(), OFX::Double2DParamDescriptor::setDimensionLabels(), OFX::Double3DParamDescriptor::setDimensionLabels(), OFX::BaseDoubleParamDescriptor::setDoubleType(), OFX::ClipDescriptor::setFieldExtraction(), OFX::ParamDescriptor::setHint(), OFX::Param::setHint(), OFX::ParametricParamDescriptor::setLabel(), OFX::ParamDescriptor::setLabels(), OFX::ClipDescriptor::setLabels(), OFX::ImageEffectDescriptor::setLabels(), OFX::Param::setLabels(), OFX::ClipPreferencesSetter::setOutputFielding(), OFX::ClipPreferencesSetter::setOutputPremultiplication(), OFX::ParamSetDescriptor::setPageParamOrder(), OFX::ParamDescriptor::setParent(), OFX::ImageEffectDescriptor::setPluginGrouping(), OFX::ImageEffectDescriptor::setRenderThreadSafety(), OFX::ParamDescriptor::setScriptName(), and OFX::StringParamDescriptor::setStringType().

Here is the call graph for this function:

void OFX::PropertySet::propSetString ( const char *  property,
const std::string &  value,
bool  throwOnFailure = true 
) [inline]

Definition at line 355 of file ofxsCore.h.

References propSetString().

Referenced by propSetString().

Here is the call graph for this function:

static void OFX::PropertySet::setThrowOnUnsupportedProperties ( bool  v) [inline, static]

Do we throw an exception if a host returns 'unsupported' when setting a property. Default is true.

Definition at line 322 of file ofxsCore.h.

References _gThrowOnUnsupported.


Field Documentation

int OFX::PropertySet::_gPropLogging = 1 [static, protected]

Class static, whether we are logging each property action.

are we logging property get/set

Definition at line 309 of file ofxsCore.h.

Referenced by propDisableLogging(), and propEnableLogging().

bool OFX::PropertySet::_gThrowOnUnsupported = true [static, protected]

Do not throw an exception if a host returns 'unsupported' when setting a property.

Do we throw an exception if a host returns 'unsupported' when setting a property.

Definition at line 312 of file ofxsCore.h.

Referenced by getThrowOnUnsupportedProperties(), and setThrowOnUnsupportedProperties().

The raw property handle.

Definition at line 306 of file ofxsCore.h.

Referenced by propSetHandle().


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