35 #ifndef IE_CORE_NUMERICPARAMETER_H
36 #define IE_CORE_NUMERICPARAMETER_H
38 #include "IECore/Parameter.h"
39 #include "IECore/TypedData.h"
40 #include "OpenEXR/ImathLimits.h"
55 IE_CORE_DECLAREPTR( ObjectType );
56 typedef std::pair<std::string, T> Preset;
57 typedef std::vector<Preset> PresetsContainer;
60 T minValue = Imath::limits<T>::min(), T maxValue = Imath::limits<T>::max(),
61 const PresetsContainer &presets = PresetsContainer(),
bool presetsOnly =
false, ConstCompoundObjectPtr
userData =
nullptr );
64 const PresetsContainer &presets, ConstCompoundObjectPtr
userData =
nullptr );
68 bool hasMinValue()
const;
71 bool hasMaxValue()
const;
92 bool valueValid(
const Object *value, std::string *reason =
nullptr )
const override;
99 static TypeDescription<NumericParameter<T> > g_typeDescription;
107 IE_CORE_DECLAREPTR( IntParameter );
108 IE_CORE_DECLAREPTR( FloatParameter );
109 IE_CORE_DECLAREPTR( DoubleParameter );
113 #endif // IE_CORE_NUMERICPARAMETER_H
Definition: Parameter.h:53
bool valueValid(const Object *value, std::string *reason=nullptr) const override
const std::string & description() const
Returns the description for this parameter.
Definition: TypedData.h:64
CompoundObject * userData()
Returns the userdata. This can be modified freely.
T getNumericValue() const
const std::string & name() const
Returns the name of this parameter.
Definition: NumericParameter.h:48
void setNumericValue(T value)
T numericDefaultValue() const
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