35 #ifndef IE_CORE_COMPOUNDPARAMETER_H
36 #define IE_CORE_COMPOUNDPARAMETER_H
38 #include "IECore/Export.h"
39 #include "IECore/Parameter.h"
40 #include "IECore/CompoundObject.h"
61 CompoundParameter(
const std::string &name =
"",
const std::string &description =
"", ConstCompoundObjectPtr userData=
nullptr,
bool adoptChildPresets=
true );
66 CompoundParameter(
const std::string &name,
const std::string &description, I membersBegin, I membersEnd, ConstCompoundObjectPtr userData=
nullptr,
bool adoptChildPresets=
true );
71 const Object *defaultValue()
const override;
86 bool presetsOnly()
const override;
89 bool valueValid(
const Object *value, std::string *reason =
nullptr )
const override;
93 void setValue( ObjectPtr value )
override;
97 Object *getValue()
override;
99 const Object *getValue()
const override;
107 void addParameter( ParameterPtr parameter );
113 void addParameters( I begin, I end );
117 void insertParameter( ParameterPtr parameter, ConstParameterPtr other );
120 void removeParameter( ParameterPtr parameter );
123 void removeParameter(
const std::string &name );
125 void clearParameters();
130 const ParameterMap ¶meters()
const;
134 const ParameterVector &orderedParameters()
const;
139 T *parameter(
const std::string &name );
141 const T *parameter(
const std::string &name )
const;
145 bool parameterPath(
const Parameter *child, std::vector<std::string> &path )
const;
148 void setParameterValue(
const std::string &name, ObjectPtr value );
151 void setValidatedParameterValue(
const std::string &name, ObjectPtr value );
155 Object *getParameterValue(
const std::string &name );
159 Object *getValidatedParameterValue(
const std::string &name );
164 ParameterMap m_namesToParameters;
165 ParameterVector m_parameters;
166 bool m_adoptChildPresets;
174 #include "IECore/CompoundParameter.inl"
176 #endif // IE_CORE_COMPOUNDPARAMETER_H
Definition: Parameter.h:53
std::vector< ParameterPtr > ParameterVector
A type to hold a vector of Parameters.
Definition: CompoundParameter.h:56
std::vector< Preset > PresetsContainer
A type to store a bunch of preset values for the Parameter.
Definition: Parameter.h:63
Definition: CompoundParameter.h:47
std::map< InternedString, ParameterPtr > ParameterMap
A type to map from names to Parameters.
Definition: CompoundParameter.h:54
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43