85 virtual const char *getDataTypeToken()
const = 0;
86 virtual bool saveAscii(std::ostream &os)
const = 0;
87 virtual bool saveBinary(std::ostream &os)
const = 0;
88 virtual int64 getMemoryUsage()
const = 0;
111 virtual const char *getDataTypeToken()
const = 0;
123 static void saveTypedAscii(
136 virtual const char *getDataType()
const = 0;
137 virtual int64 getMemoryUsage()
const = 0;
144 UT_SMALLOBJECT_CLEANPAGES_DEFAULT,
145 UT_SMALLOBJECT_PAGESIZE_DEFAULT,
146 UT_SMALLOBJECT_THREADSAFE_OFF>
160 void adoptOverrides(
PRM_Parm &srcparm);
163 void revertToDefault(
fpreal time,
int index,
bool propagate=
true);
164 void restoreFactoryDefaults();
165 void restoreFactoryDefault(
int index);
168 {
return myDestructiveRevertToDefaultFlag; }
170 { myDestructiveRevertToDefaultFlag =
v; }
173 {
return myRevertInvisibleToDefaultsFlag; }
175 { myRevertInvisibleToDefaultsFlag =
v; }
178 {
return myMakeSpareParmsForUnknownChannelsFlag; }
180 { myMakeSpareParmsForUnknownChannelsFlag =
v; }
183 static bool isStringThatCanExpand(
const char *str);
184 static bool isOrdinalExpression(
const char *str,
186 static bool isOrdinalExpression(
const PRM_Default &dflt,
191 static void convertStringToExprLanguage(
const char *str,
194 static void convertStringFromExprLanguage(
const char *str,
198 static bool getIsAddingOrRemovingMultiParms();
203 static void instanceMultiString(
UT_String &token,
205 bool fill_remaining=
true);
206 static void instanceMultiString(
UT_String &token,
207 const int *indexlist,
int num,
208 bool fill_remaining=
true);
213 int isDefault()
const;
214 int isDefault(
int index)
const;
215 int isFactoryDefault()
const;
216 int isFactoryDefault(
int index)
const;
222 int isTrueFactoryDefault(
int index)
const;
223 int isTrueFactoryDefault()
const;
228 int isFactoryDefaultUI(
int index)
const;
229 int isFactoryDefaultUI()
const;
231 void overwriteDefaults(
fpreal time);
232 void overwriteDefault(
fpreal time,
int index);
235 void changeOpRef(
const char *new_fullpath,
const char *old_fullpath,
236 const char *old_cwd,
const char *chan_name,
237 const char *old_chan_name,
238 void (*undo_callback)(
void *),
void *undo_data,
248 bool expand,
int thread)
const;
250 bool expand,
int thread)
const;
257 bool expand,
int thread)
const;
263 void getDefaultValue(
fpreal &
value,
int index)
const;
270 int index,
int thread)
const;
275 int index,
int thread)
const;
277 int index,
int thread)
const;
282 int index,
int thread)
const;
286 int index,
bool evaluate =
true,
287 bool rmchannel =
false,
bool propagate =
true);
297 bool kill_expr =
false,
int index = 0,
299 bool propagate =
true);
302 bool kill_expr =
false,
int index = 0,
304 bool propagate =
true);
307 bool kill_expr =
false,
int index = 0,
309 bool propagate =
true);
312 bool kill_expr =
false,
int index = 0,
314 bool propagate =
true);
317 bool kill_expr =
false,
int index = 0,
319 bool propagate =
true);
327 bool kill_expr =
false,
329 bool propagate =
true);
331 bool kill_expr =
false,
333 bool propagate =
true);
335 bool kill_expr =
false,
337 bool propagate =
true);
340 bool kill_expr =
false,
342 bool propagate =
true);
349 bool isMultiParm()
const;
356 void insertMultiParmItem(
int index,
bool propagate = 1);
359 void removeMultiParmItem(
int index,
bool propagate = 1);
362 void revertMultiParmItem(
int index);
366 void revertAllMultiParmItems();
370 void assignMultiParmItem(
int from,
int to);
374 void swapMultiParmItem(
int from,
int to);
379 void moveMultiParmItems(
380 const UT_Array<std::pair<int,int>> &moves);
383 int getMultiParmNumItems()
const;
389 int getMultiParmInstancesPerItem()
const;
393 const char* getMultiParmToken(
int p,
int index)
const;
398 int getMultiParmUIEntries()
const;
401 const PRM_Template *getMultiParmTemplate(
int idx)
const;
406 PRM_Parm *getMultiParm(
int idx)
const;
407 int getMultiParmCount()
const;
415 { privateValueChanged(vec_idx, propagate,
417 void sendValueChanged(
int vec_idx,
bool propagate);
418 void indirectChange(
int vec_idx,
bool expr_changed,
419 bool update_multi =
true);
422 int setOverride(
int index,
int data_idx,
const char *
source,
424 const char *getOverride(
int index)
const;
425 int getOverrideDataIndex(
int index)
const;
427 bool getOverrideTrackName(
int index,
UT_String &trackname)
const;
429 int setOverrideDisable(
int index,
int onoff);
430 int getIsOverrideActive(
int index)
const;
441 bool current_value_only =
false,
448 void copyValue(
fpreal t,
int dest_vi,
449 const PRM_Parm &src_parm,
int src_vi,
451 bool current_value_only,
452 bool set_value_to_default =
false,
457 void addChannel(
int index,
bool propagate =
true);
458 void addChannel(
int index,
const char *theexpr,
460 int addChannel(
const char *
name);
461 int addChannel(
const char *
name,
const char *expr,
464 void clearAndDestroyChannels(
bool force =
false);
465 void removeChannel(
int index,
bool propagage =
true);
469 void clearAndDestroyUnrefChannels(
const PRM_Parm &repl_parm);
472 int getChannelCount()
const;
474 void reloadChannelPtrs();
475 int channelPtrModified(
const char *
name);
477 int isTimeDependent()
const;
478 bool isTimeDependent(
int subindex)
const;
479 int isDataDependent(
fpreal gtime)
const;
480 bool isDataDependent(
fpreal gtime,
int subindex)
const;
481 void forceTimeDependent(
int subindex);
483 bool hasContextOptionDeps(
int subindex)
const;
485 bool hasGlobalContextOptionDependency(
int subindex,
487 void forceContextOptionDep(
int subindex,
489 bool set_dependency_on_global);
494 fpreal getMultiSize()
const;
495 int getMultiStartOffset()
const;
497 bool isRampType()
const;
498 bool isRampTypeColor()
const;
501 {
return getTemplatePtr()->getVectorSize(); }
502 void getChannelToken(
UT_String &thestrref,
int index = 0)
const;
503 void getChannelLabel(
UT_String &thestrref,
int index = 0)
const;
505 void getLabel(
UT_String &thestrref)
const;
506 void getHelpText(
UT_String &helptext)
const;
507 void getHelpUrl(
UT_String &helptext)
const;
508 void getHelpTitle(
UT_String &helptext)
const;
511 const char *getLabel()
const;
515 {
return getTemplatePtr()->getTokenRef(); }
519 {
return getTemplatePtr()->getChannelToken(vi); }
523 {
return getTemplatePtr()->getDecodedChannelToken(vi); }
525 void getChannelLabelForUI(
UT_String &thestrref,
int vec_idx)
const;
529 unsigned getTokenHash()
const;
531 bool hasChannelAlias(
int subindex)
const ;
532 void getChannelAlias(
UT_String &stringref,
int subindex)
const;
534 getChannelAlias(
int subindex)
const;
542 bool setChannelAlias(
const char *token_alias,
int subindex);
550 void createInputNotifyValue();
553 bool hasMicroNodes()
const;
556 int isDirty(
int vector_idx=0)
const;
557 int areAllFlagsClean()
const;
558 void clearAllDirtyFlags();
562 bool isSendExtra(
int vi)
const;
563 bool hasAnySendExtraFlags()
const;
565 int findSubIndex(
const char *thechannelname,
bool allow_alias)
const;
575 unsigned getEnableState(
int comp = -1)
const;
576 unsigned getInstanceEnableState(
int comp = -1)
const;
577 int setEnableState(
int thestate,
int comp = -1);
579 bool getActiveTakeFlag()
const;
580 bool getAlwaysTakeFlag()
const;
581 void setActiveTakeFlag(
int onoff);
582 bool getBypassFlag()
const;
583 void setBypassFlag(
bool v);
585 bool getVisibleState(
int comp = -1)
const;
586 bool setVisibleState(
bool f,
int comp = -1);
588 int getExpressionState();
589 void setExpressionState(
int state);
591 void setValueState(
int state);
596 bool isValueEditableByUI(
fpreal time,
int index)
const;
601 bool isExpressionEditableByUI(
fpreal time,
int index)
const;
604 void hardenChanges(
fpreal time,
bool forceflag = 0,
605 const char *patt =
nullptr,
607 void hardenChanges(
fpreal time,
int index,
bool forceflag = 0,
608 const char *patt =
nullptr,
611 void setKey(
fpreal time,
int index);
612 void setKey(
fpreal time,
int index,
const char *
exp,
614 const char *patt =
nullptr,
618 bool accel_ratios =
true);
630 bool isLanguageOldExprOrLiteral(
fpreal time,
int index);
632 int changePending(
int index);
636 void save(std::ostream &os,
int binary,
bool compiled)
const;
642 void saveCommand(std::ostream &os,
int values=0,
int index=-1)
const;
643 int loadCommand(
int argc,
const char *
const argv[],
int index,
649 int findString(
const char *str,
bool fullword,
650 bool usewildcards)
const;
651 int changeString(
const char *from,
const char *to,
bool fullword);
653 bool notifyVarChange(
const char *varname);
655 bool getUndoSavedFlag();
659 void setUndoSavedFlag(
bool f);
661 bool getAutoTakeUndoSavedFlag();
665 void setAutoTakeUndoSavedFlag(
bool f);
667 bool getLockedFlag(
int vec_idx)
const;
668 bool areAllComponentsLocked()
const;
669 void setLockedFlag(
int vec_idx,
bool f);
670 unsigned int getLockedField()
const;
671 bool getAutoScopedFlag(
int vec_idx)
const;
672 void setAutoScopedFlag(
int vec_idx,
bool f);
673 unsigned int getAutoScopedField()
const;
677 int parm_group_mask ,
678 bool add_if_default ,
682 void destroyChildParms();
692 bool isCompatible(
const PRM_Parm &other_parm)
const;
696 bool isOfBasicType(
const PRM_Type &check_type)
const;
701 bool isParmValueEqual(
PRM_Parm &other_parm,
int vec_index,
703 bool isParmValueEqual(
int vec_index,
PRM_Parm &other_parm,
704 int other_index,
fpreal time,
712 int vec_index)
const;
716 void getAllChannelAliases(
UT_String &aliasstring,
717 char sep =
'/')
const;
720 bool isActive(
const int index)
const;
721 void setActive(
const int index,
const bool active);
723 int64 getMemoryUsage(
bool inclusive)
const;
725 bool isSpareParm()
const;
726 void setSpareParm(
bool sp)
const;
729 void setMultiParmOwner(
const PRM_Multi *multiparmowner);
747 bool instance_index=
true)
const;
749 void rebuildParmDependency();
751 bool isRotationParm()
const;
755 void setChannelReference(
fpreal time,
758 const char *ch_name=
nullptr,
760 bool rmchannel=
false);
770 const char *ch_name=
nullptr);
772 static bool isChanRefString(
const char *str,
bool is_expr,
775 bool getHaveCompiledExpressions()
const;
780 void setSaveLabelFlag(
bool f);
783 bool hasChannelCustomColor(
int index)
const;
784 const UT_Color &getChannelCustomColor(
int index)
const;
785 void setChannelCustomColor(
int index,
const UT_Color &
c);
786 void resetChannelCustomColor(
int index);
788 bool getAutoSelectFlag(
int vec_idx)
const;
789 void setAutoSelectFlag(
int vec_idx,
bool f);
790 unsigned int getAutoSelectField()
const;
792 void setTimeDependentMicroNode(
int subindex,
bool timedep)
const;
794 void privateValueChanged(
799 template <
typename DstT,
typename SrcT>
813 static bool myAlwaysHardenFlag;
814 static bool myDestructiveRevertToDefaultFlag;
815 static bool myRevertInvisibleToDefaultsFlag;
816 static bool myMakeSpareParmsForUnknownChannelsFlag;
GLsizei GLenum const void * indices
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
const UT_StringRef & getTokenRef() const
static bool getDestructiveRevertToDefaultFlag()
GT_API const UT_StringHolder time
static bool getMakeSpareParmsForUnknownChannelsFlag()
PRM_API size_t format(char *buffer, size_t buffer_size, const PRM_Parm &v)
UT_SharedPtr< PRM_UndoData > PRM_UndoDataHandle
int getVectorSize() const
GLsizei const GLfloat * value
const GLuint GLenum const void * binary
UT_ConcurrentSet< UT_StringHolder > DEP_ContextOptionDeps
UT_Array< std::pair< UT_StringHolder, PRM_UndoDataHandle > > PRM_UndoDataList
GLsizei const GLchar *const * path
virtual bool canSaveAsUnprotectedString() const
static void setMakeSpareParmsForUnknownChannelsFlag(bool v)
__hostdev__ void setValue(uint32_t offset, bool v)
virtual UT_JSONValueMap * getKeyValueDict() const
static bool getRevertInvisibleToDefaultsFlag()
__hostdev__ float getValue(uint32_t i) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
GLint GLint GLsizei GLint GLenum GLenum type
const UT_StringHolder & getDecodedChannelToken(int vi=0) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void setAlwaysHardenFlag(bool o)
GLsizei GLsizei GLchar * source
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
void valueChanged(int vec_idx, bool propagate)
PRM_Callback getCallback()
GLuint const GLchar * name
const UT_StringHolder & getChannelToken(int vi=0) const
static void setRevertInvisibleToDefaultsFlag(bool v)
SYS_FORCE_INLINE UT_StringHolder getToken(Add enum_value)
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
static bool getAlwaysHardenFlag()
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
SIM_API const UT_StringHolder force
GLenum GLsizei GLsizei GLint * values
PRM_ParmList * getOwner() const
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate and *a name There is also one special expression reference
static void setDestructiveRevertToDefaultFlag(bool v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.