11 #ifndef __PRM_Conditional__
12 #define __PRM_Conditional__
68 mem += myControlParms.getMemoryUsage(
false);
69 mem += myControlValues.getMemoryUsage(
false);
70 mem += myTestOperators.getMemoryUsage(
false);
80 myControlParms = src.myControlParms;
81 myControlValues = src.myControlValues;
82 myTestOperators = src.myTestOperators;
89 myControlParms.clear();
90 myControlValues.clear();
91 myTestOperators.clear();
97 myControlParms.append(parm);
98 myControlValues.append(value);
99 myTestOperators.append(op);
103 {
return myControlParms; }
105 {
return myControlValues; }
107 {
return myTestOperators; }
138 virtual int64 getMemoryUsage(
bool inclusive)
const = 0;
182 void getStringFromList(
186 void getStringFromList(
UT_String &str)
const;
189 bool setListFromString(
const char *conditional,
197 static bool verifyConditionalString(
const char *conditional,
200 static bool getOperatorFromString(
const char *testoperator,
203 static bool isValidOperator(
const char *testoperator);
210 static bool parseOperatorString(
const char *&testoperator,
213 static bool parseConditionalString(
const char *str,
220 void evalFunction(
const PRM_Parm &prm,
255 void addConditional(
const char *conditional,
272 prm_ConditionalMap myConditionals;
280 , myConditional(conditional)
314 void setTabConditional(
317 void addTabConditional(
324 prm_SwitcherMap myTabConditionals;
GLsizei GLenum const void * indices
virtual ~PRM_ConditionalBase()
GLuint GLsizei const GLchar * label
#define SYS_DEPRECATED(__V__)
const PRM_ConditionalInfo & operator=(const PRM_ConditionalInfo &src)
virtual PRM_Conditional * getConditional(PRM_ConditionalType type)=0
PRM_ConditionalGroupType groupType() const override
**But if you need a result
const UT_StringArray & getControlValues() const
PRM_ConditionalType myType
virtual PRM_ConditionalBase * instance(const UT_IntArray &index_list) const =0
virtual int64 getMemoryUsage(bool inclusive) const =0
UT_VariadicT< PRM_ConditionalSwitcherItem > PRM_ConditionalSwitcherArgs
const UT_StringArray & getControlParms() const
std::pair< const char *, PRM_ConditionalType > PRM_ConditionalGroupItem
PRM_ConditionalInfo(PRM_ConditionalInfo &other)
PRM_ConditionalSwitcherItem(int index, const char *conditional, PRM_ConditionalType type)
const UT_Array< PRM_ConditionalOperator > & getTestOperators() const
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
PRM_ConditionalGroupType groupType() const override
PRM_ConditionalSwitcher()
HUSD_API bool eval(VtValue &val, T &ret_val)
UT_VariadicT< PRM_ConditionalGroupItem > PRM_ConditionalGroupArgs
void addCondition(const UT_StringHolder &parm, const UT_StringHolder &value, PRM_ConditionalOperator op)
PRM_ConditionalGroupType groupType() const override
int64 getMemoryUsage(bool inclusive) const
LeafData & operator=(const LeafData &)=delete
int64 getMemoryUsage(bool inclusive) const override
This class allow setting multiple conditionals for a PRM_Template.
**If you just want to fire and args
const char * myConditional
PRM_ConditionalType getType() const
PRM_ConditionalBase * instance(const UT_IntArray &indices) const override