TuttleOFX  1
ofxsPropertyValidation.cpp File Reference
#include "ofxsSupportPrivate.h"
#include <cstdarg>
#include <cassert>
Include dependency graph for ofxsPropertyValidation.cpp:

Go to the source code of this file.

Namespaces

namespace  OFX
 

The core 'OFX Support' namespace, used by plugin implementations. All code for these are defined in the common support libraries.


namespace  OFX::Validation
 

The validation code has its own namespace.


Defines

#define NULLPTR   ( (void*)( 0 ) )
 Null pointer definition.
#define mPropDescriptionArg(descs)   descs, sizeof( descs ) / sizeof( PropertyDescription )
 This macro is used to short hand passing the var args to OFX::Validation::PropertySetDescription::PropertySetDescription.

Functions

static void OFX::Validation::setVectorFromVarArgs (OFX::PropertyTypeEnum ilk, int dimension, va_list &argp, std::vector< ValueHolder > &vec)
 Set the vector by getting dimension things specified by ilk from the argp list, used by PropertyDescription ctor.
void OFX::Validation::validateHostProperties (OfxHost *host)
 Validates the host structure and property handle.
void OFX::Validation::validatePluginDescriptorProperties (PropertySet props)
 Validates the effect descriptor properties.
void OFX::Validation::validatePluginInstanceProperties (PropertySet props)
 Validates the effect instance properties.
void OFX::Validation::validateClipDescriptorProperties (PropertySet props)
 validates a clip descriptor
void OFX::Validation::validateClipInstanceProperties (PropertySet props)
 validates a clip instance
void OFX::Validation::validateImageProperties (PropertySet props)
 validates a clip descriptor
void OFX::Validation::validateActionArgumentsProperties (const std::string &action, PropertySet inArgs, PropertySet outArgs)
 Validates action in/out arguments.
void OFX::Validation::validateParameterProperties (ParamTypeEnum paramType, OFX::PropertySet &paramProps, bool checkDefaults)
 Validates parameter properties.
void OFX::Validation::initialise (void)
 Initialises validation stuff that needs to be done once we know how the host behaves, called during the onload action.

Variables

static PropertyDescription OFX::Validation::gHostProps []
 A list of properties that all hosts must have, and will be validated against. None of these has a default, but they must exist.
static PropertySetDescription OFX::Validation::gHostPropSet ("Host Property", gHostProps, sizeof(gHostProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for the global host pointer
static PropertyDescription OFX::Validation::gPluginDescriptorProps []
 A list of properties to validate the effect descriptor against.
static PropertySetDescription OFX::Validation::gPluginDescriptorPropSet ("Plugin Descriptor", gPluginDescriptorProps, sizeof(gPluginDescriptorProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for the global plugin descriptor
static PropertyDescription OFX::Validation::gPluginInstanceProps []
 A list of properties to validate the plugin instance.
static PropertySetDescription OFX::Validation::gPluginInstancePropSet ("Plugin Instance", gPluginInstanceProps, sizeof(gPluginInstanceProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for a plugin instance
static PropertyDescription OFX::Validation::gClipDescriptorProps []
 A list of properties to validate a clip descriptor.
static PropertySetDescription OFX::Validation::gClipDescriptorPropSet ("Clip Descriptor", gClipDescriptorProps, sizeof(gClipDescriptorProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for a clip descriptor
static PropertyDescription OFX::Validation::gClipInstanceProps []
 A list of properties to validate a clip instance.
static PropertySetDescription OFX::Validation::gClipInstancePropSet ("Clip Instance", gClipInstanceProps, sizeof(gClipInstanceProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for a clip instance
static PropertyDescription OFX::Validation::gImageInstanceProps []
 List of properties to validate an image instance.
static PropertySetDescription OFX::Validation::gImageInstancePropSet ("Image Instance", gImageInstanceProps, sizeof(gImageInstanceProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for an image instance
static PropertyDescription OFX::Validation::gDescribeInContextActionInArgProps []
 kOfxImageEffectActionDescribeInContext actions's inargs properties
static PropertySetDescription OFX::Validation::gDescribeInContextActionInArgPropSet (kOfxImageEffectActionDescribeInContext" in argument", gDescribeInContextActionInArgProps, sizeof(gDescribeInContextActionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 the property set for describe in context action
static PropertyDescription OFX::Validation::gRenderActionInArgProps []
 kOfxImageEffectActionRender action's inargs properties
static PropertySetDescription OFX::Validation::gRenderActionInArgPropSet (kOfxImageEffectActionRender" in argument", gRenderActionInArgProps, sizeof(gRenderActionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionRender property set
static PropertyDescription OFX::Validation::gBeginSequenceRenderActionInArgProps []
 kOfxImageEffectActionBeginSequenceRender action's inargs properties
static PropertySetDescription OFX::Validation::gBeginSequenceRenderActionInArgPropSet (kOfxImageEffectActionBeginSequenceRender" in argument", gBeginSequenceRenderActionInArgProps, sizeof(gBeginSequenceRenderActionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionBeginSequenceRender property set
static PropertyDescription OFX::Validation::gEndSequenceRenderActionInArgProps []
 kOfxImageEffectActionEndSequenceRender action's inargs properties
static PropertySetDescription OFX::Validation::gEndSequenceRenderActionInArgPropSet (kOfxImageEffectActionEndSequenceRender" in argument", gEndSequenceRenderActionInArgProps, sizeof(gEndSequenceRenderActionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionEndSequenceRender property set
static PropertyDescription OFX::Validation::gIsIdentityActionInArgProps []
 kOfxImageEffectActionIsIdentity action's inargs properties
static PropertySetDescription OFX::Validation::gIsIdentityActionInArgPropSet (kOfxImageEffectActionIsIdentity" in argument", gIsIdentityActionInArgProps, sizeof(gIsIdentityActionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionIsIdentity property set
static PropertyDescription OFX::Validation::gIsIdentityActionOutArgProps []
 kOfxImageEffectActionIsIdentity action's outargs properties
static PropertySetDescription OFX::Validation::gIsIdentityActionOutArgPropSet (kOfxImageEffectActionIsIdentity" out argument", gIsIdentityActionOutArgProps, sizeof(gIsIdentityActionOutArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionIsIdentity property set
static PropertyDescription OFX::Validation::gGetRegionOfDefinitionInArgProps []
 kOfxImageEffectActionGetRegionOfDefinition action's inargs properties
static PropertySetDescription OFX::Validation::gGetRegionOfDefinitionInArgPropSet (kOfxImageEffectActionGetRegionOfDefinition" in argument", gGetRegionOfDefinitionInArgProps, sizeof(gGetRegionOfDefinitionInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetRegionOfDefinition property set
static PropertyDescription OFX::Validation::gGetRegionOfDefinitionOutArgProps []
 kOfxImageEffectActionGetRegionOfDefinition action's outargs properties
static PropertySetDescription OFX::Validation::gGetRegionOfDefinitionOutArgPropSet (kOfxImageEffectActionGetRegionOfDefinition" out argument", gGetRegionOfDefinitionOutArgProps, sizeof(gGetRegionOfDefinitionOutArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetRegionOfDefinition property set
static PropertyDescription OFX::Validation::gGetRegionOfInterestInArgProps []
 kOfxImageEffectActionGetRegionsOfInterest action's inargs properties
static PropertySetDescription OFX::Validation::gGetRegionOfInterestInArgPropSet (kOfxImageEffectActionGetRegionsOfInterest"in argument", gGetRegionOfInterestInArgProps, sizeof(gGetRegionOfInterestInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetRegionsOfInterest property set
static PropertyDescription OFX::Validation::gGetTimeDomainOutArgProps []
 kOfxImageEffectActionGetTimeDomain action's outargs properties
static PropertySetDescription OFX::Validation::gGetTimeDomainOutArgPropSet (kOfxImageEffectActionGetTimeDomain" out argument", gGetTimeDomainOutArgProps, sizeof(gGetTimeDomainOutArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetTimeDomain property set
static PropertyDescription OFX::Validation::gGetFramesNeededInArgProps []
 kOfxImageEffectActionGetFramesNeeded action's inargs properties
static PropertySetDescription OFX::Validation::gGetFramesNeededInArgPropSet (kOfxImageEffectActionGetFramesNeeded" in argument", gGetFramesNeededInArgProps, sizeof(gGetFramesNeededInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetFramesNeeded property set
static PropertyDescription OFX::Validation::gGetClipPreferencesOutArgProps []
 kOfxImageEffectActionGetClipPreferences action's outargs properties
static PropertySetDescription OFX::Validation::gGetClipPreferencesOutArgPropSet (kOfxImageEffectActionGetClipPreferences" out argument", gGetClipPreferencesOutArgProps, sizeof(gGetClipPreferencesOutArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxImageEffectActionGetClipPreferences property set
static PropertyDescription OFX::Validation::gInstanceChangedInArgProps []
 kOfxActionInstanceChanged action's inargs properties
static PropertySetDescription OFX::Validation::gInstanceChangedInArgPropSet (kOfxActionInstanceChanged" in argument", gInstanceChangedInArgProps, sizeof(gInstanceChangedInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxActionInstanceChanged property set
static PropertyDescription OFX::Validation::gBeginEndInstanceChangedInArgProps []
 kOfxActionBeginInstanceChanged and kOfxActionEndInstanceChanged actions' inargs properties
static PropertySetDescription OFX::Validation::gBeginInstanceChangedInArgPropSet (kOfxActionBeginInstanceChanged" in argument", gBeginEndInstanceChangedInArgProps, sizeof(gBeginEndInstanceChangedInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxActionBeginInstanceChanged property set
static PropertySetDescription OFX::Validation::gEndInstanceChangedInArgPropSet (kOfxActionEndInstanceChanged" in argument", gBeginEndInstanceChangedInArgProps, sizeof(gBeginEndInstanceChangedInArgProps)/sizeof(PropertyDescription), NULLPTR)
 kOfxActionEndInstanceChanged property set
static PropertyDescription OFX::Validation::gBasicParamProps []
 Basic parameter descriptor properties.
static PropertyDescription OFX::Validation::gInteractOverideParamProps []
 Props for params that can have an interact override their UI.
static PropertyDescription OFX::Validation::gValueHolderParamProps []
 Props for params that can hold values.
static PropertyDescription OFX::Validation::gStringParamProps []
 values for a string param
static PropertyDescription OFX::Validation::gCustomParamProps []
 values for a string param
static PropertyDescription OFX::Validation::gRGBColourParamProps []
 properties for an RGB colour param
static PropertyDescription OFX::Validation::gRGBAColourParamProps []
 properties for an RGBA colour param
static PropertyDescription OFX::Validation::gBooleanParamProps []
 properties for a boolean param
static PropertyDescription OFX::Validation::gChoiceParamProps []
 properties for a boolean param
static PropertyDescription OFX::Validation::gInt1DParamProps []
 properties for a 1D integer param
static PropertyDescription OFX::Validation::gInt2DParamProps []
 properties for a 2D integer param
static PropertyDescription OFX::Validation::gInt3DParamProps []
 properties for a 3D integer param
static PropertyDescription OFX::Validation::gDoubleParamProps []
 Properties common to all double params.
static PropertyDescription OFX::Validation::gDouble1DParamProps []
 properties for a 1D double param
static PropertyDescription OFX::Validation::gDouble2DParamProps []
 properties for a 2D double param
static PropertyDescription OFX::Validation::gDouble3DParamProps []
 properties for a 3D double param
static PropertyDescription OFX::Validation::gGroupParamProps []
 properties for a group param
static PropertyDescription OFX::Validation::gPageParamProps []
 properties for a page param
static PropertyDescription OFX::Validation::gParametricParamProps []
 properties for a parametric param
static PropertyDescription OFX::Validation::gCameraParamProps []
 properties for a camera param
static PropertySetDescription OFX::Validation::gInt1DParamPropSet ("1D Integer parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gInt1DParamProps), NULLPTR)
 Property set for 1D ints.
static PropertySetDescription OFX::Validation::gInt2DParamPropSet ("2D Integer parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gInt2DParamProps), NULLPTR)
 Property set for 2D ints.
static PropertySetDescription OFX::Validation::gInt3DParamPropSet ("3D Integer parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gInt3DParamProps), NULLPTR)
 Property set for 3D ints.
static PropertySetDescription OFX::Validation::gDouble1DParamPropSet ("1D Double parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gDoubleParamProps), mPropDescriptionArg(gDouble1DParamProps), NULLPTR)
 Property set for 1D doubles.
static PropertySetDescription OFX::Validation::gDouble2DParamPropSet ("2D Double parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gDoubleParamProps), mPropDescriptionArg(gDouble2DParamProps), NULLPTR)
 Property set for 2D doubles.
static PropertySetDescription OFX::Validation::gDouble3DParamPropSet ("3D Double parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gDoubleParamProps), mPropDescriptionArg(gDouble3DParamProps), NULLPTR)
 Property set for 3D doubles.
static PropertySetDescription OFX::Validation::gRGBParamPropSet ("RGB Colour parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gRGBColourParamProps), NULLPTR)
 Property set for RGB colour params.
static PropertySetDescription OFX::Validation::gRGBAParamPropSet ("RGB Colour parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gRGBAColourParamProps), NULLPTR)
 Property set for RGB colour params.
static PropertySetDescription OFX::Validation::gStringParamPropSet ("String parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gStringParamProps), NULLPTR)
 Property set for string params.
static PropertySetDescription OFX::Validation::gCustomParamPropSet ("Custom parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gCustomParamProps), NULLPTR)
 Property set for string params.
static PropertySetDescription OFX::Validation::gBooleanParamPropSet ("Boolean parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gBooleanParamProps), NULLPTR)
 Property set for boolean params.
static PropertySetDescription OFX::Validation::gChoiceParamPropSet ("Choice parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gChoiceParamProps), NULLPTR)
 Property set for choice params.
static PropertySetDescription OFX::Validation::gPushButtonParamPropSet ("PushButton parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), NULLPTR)
 Property set for push button params.
static PropertySetDescription OFX::Validation::gGroupParamPropSet ("Group Parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gGroupParamProps), NULLPTR)
 Property set for push button params.
static PropertySetDescription OFX::Validation::gPageParamPropSet ("Page Parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gPageParamProps), NULLPTR)
 Property set for push button params.
static PropertySetDescription OFX::Validation::gParametricParamPropSet ("Parametric Parameter", mPropDescriptionArg(gBasicParamProps), mPropDescriptionArg(gInteractOverideParamProps), mPropDescriptionArg(gValueHolderParamProps), mPropDescriptionArg(gParametricParamProps), NULLPTR)
static PropertySetDescription OFX::Validation::gCameraParamPropSet ("Camera Parameter", mPropDescriptionArg(gCameraParamProps), NULLPTR)

Detailed Description

This file contains headers for classes that are used to validate property sets and make sure they have the right members and default values.

Definition in file ofxsPropertyValidation.cpp.


Define Documentation

#define mPropDescriptionArg (   descs)    descs, sizeof( descs ) / sizeof( PropertyDescription )

This macro is used to short hand passing the var args to OFX::Validation::PropertySetDescription::PropertySetDescription.

Definition at line 235 of file ofxsPropertyValidation.cpp.

#define NULLPTR   ( (void*)( 0 ) )

Null pointer definition.

Definition at line 48 of file ofxsPropertyValidation.cpp.