35 #ifndef IE_CORE_TYPEDPARAMETER_H
36 #define IE_CORE_TYPEDPARAMETER_H
38 #include "IECore/Parameter.h"
39 #include "IECore/TypedData.h"
40 #include "IECore/TypedParameterInternals.h"
55 IE_CORE_DECLAREPTR( ObjectType );
57 typedef std::pair<std::string, T>
Preset;
58 typedef std::pair<std::string, ObjectTypePtr> ObjectPreset;
60 typedef std::vector<ObjectPreset> ObjectPresetsContainer;
64 const PresetsContainer &presets = PresetsContainer(),
bool presetsOnly =
false, ConstCompoundObjectPtr
userData =
nullptr );
67 const ObjectPresetsContainer &presets = ObjectPresetsContainer(),
bool presetsOnly =
false, ConstCompoundObjectPtr
userData =
nullptr );
72 bool valueValid(
const Object *value, std::string *reason =
nullptr )
const override;
91 static const TypeDescription<TypedParameter<T> > g_typeDescription;
97 #endif // IE_CORE_TYPEDPARAMETER_H
Definition: Parameter.h:53
TypedParameter(const std::string &name, const std::string &description, const T &defaultValue=T(), const PresetsContainer &presets=PresetsContainer(), bool presetsOnly=false, ConstCompoundObjectPtr userData=nullptr)
Constructs a new ObjectType object to hold the default value.
const ValueType & typedDefaultValue() const
const std::string & description() const
Returns the description for this parameter.
void setTypedValue(const T &value)
std::vector< Preset > PresetsContainer
A type to store a bunch of preset values for the Parameter.
Definition: Parameter.h:63
std::pair< std::string, ObjectPtr > Preset
Definition: Parameter.h:61
Definition: TypedParameter.h:48
Definition: TypedData.h:64
CompoundObject * userData()
Returns the userdata. This can be modified freely.
bool valueValid(const Object *value, std::string *reason=nullptr) const override
Implemented to return true only if value is of type TypedData.
const std::string & name() const
Returns the name of this parameter.
ValueType & getTypedValue()
virtual const Object * defaultValue() const
Returns the default value for this parameter.
virtual bool presetsOnly() const
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43