HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PRM_ParmList Class Reference

#include <PRM_ParmList.h>

Public Member Functions

 PRM_ParmList (PRM_Template *thetemplates, CH_Collection *thechgroupptr, PRM_ParmOwner *node, PRM_PresetInfo *presetinfo, char *optype, bool clear_channels)
 
 PRM_ParmList (PRM_ParmList *thesrcptr, PRM_Template *thenewtemplate, PRM_ParmOwner *node, PRM_PresetInfo *presetinfo, char *optype, bool leavedefaultsunchanged)
 
 ~PRM_ParmList ()
 
int getEntries () const
 
void setChannelGroupPtr (CH_Collection *thechgroupptr)
 
CH_CollectiongetChannelGroupPtr () const
 
fpreal getEvalTime (int thread) const
 
fpreal findNextKey (fpreal theoldtime)
 
fpreal findPrevKey (fpreal theoldtime)
 
int allDefaults () const
 
void buildDelayedDefaults (bool clear_channels=true)
 
PRM_ParmgetParmPtr (const char *theparmname, int &theparmidx)
 
PRM_ParmgetParmPtr (const char *theparmname)
 
const PRM_ParmgetParmPtr (const char *theparmname) const
 
PRM_ParmgetParmPtr (const PRM_Name &name)
 
const PRM_ParmgetParmPtr (const PRM_Name &name) const
 
PRM_ParmgetParmPtr (const int theindex)
 
const PRM_ParmgetParmPtr (const int theindex) const
 
int getParmIndex (const PRM_Parm *parm) const
 
int getParmIndex (const char *parmname) const
 
PRM_ParmgetParmPtrFromChannel (const char *channel, int *vecidx=0) const
 
int getParmIndex (const char *channel_name, int &subidx, bool allow_alias=true) const
 
int getParmIndexFromChannel (const char *channel, int *vecidx, bool allow_alias) const
 
void clearAllDirtyFlags ()
 
int areAllFlagsClean () const
 
void clearAllUndoSavedFlags ()
 
void revertToDefaults (fpreal time)
 
void revertValuesToFactoryDefaults ()
 
void updateFromOldTemplate (PRM_ParmList *oldlist)
 
void updateSpareParmTemplates (PRM_Template *newtemplates, bool leavedefaultsunchanged)
 
void saveSingle (PRM_Parm *, std::ostream &os, int binary) const
 
void save (std::ostream &os, int binary, bool compiled) const
 
bool load (UT_IStream &is, const char *path, PRM_ParmList *obsoleteparms)
 
void saveUndoData (PRM_UndoDataList &data)
 
void saveSingleUndoData (PRM_Parm *parm, PRM_UndoDataList &data)
 
void loadUndoData (const PRM_UndoDataList &data, const char *path, PRM_ParmList *obsoleteparms)
 
bool hasChannelAliases () const
 
void clearAndDestroyChannels ()
 
int hasAnyChannels ()
 
int addChannel (const char *name)
 
void reloadChannelPtrs ()
 
int channelPtrModified (const char *name)
 
unsigned getUserMask () const
 
void setUserMask (unsigned m)
 
unsigned getPermissions () const
 
void setPermissions (unsigned mask)
 
unsigned getAssetPermissionMask () const
 
void setAssetPermissionMask (unsigned mask)
 
int canAccess (unsigned mask=PRM_WRITE_OK, const PRM_Type &type=PRM_TYPE_ZERO) const
 
int canAccessIgnoringAssetMask (unsigned mask=PRM_WRITE_OK, const PRM_Type &type=PRM_TYPE_ZERO) const
 
int canAccessCheckingOnlyAssetMask (unsigned mask=PRM_WRITE_OK, const PRM_Type &type=PRM_TYPE_ZERO) const
 
void hardenChanges (fpreal time, bool forceflag=0, const char *patt=0, CH_ChannelRefList *list=0)
 
PRM_ChanState getChanState (fpreal time)
 
void sendChangeEvent (CH_CHANGE_TYPE what, PRM_Parm *who=0)
 
void setEventHandler (void *data, void(*handler)(void *, CH_CHANGE_TYPE, int))
 
int checkTimeDependence (bool evaluate_channels=false)
 
void setTimeDependent (int onOff)
 
void setCookTimeDependent (int onOff)
 
int getTimeDependent () const
 
int getCookTimeDependent () const
 
void pushVariables ()
 
void popVariables ()
 
int findString (const char *str, bool fullword, bool usewildcards) const
 
int changeString (const char *from, const char *to, bool fullword)
 
bool notifyVarChange (const char *varname)
 
int getSendExtraEvent ()
 
void setSendExtraEvent ()
 
void clearSendExtraEvent ()
 
void getMagicString (UT_TokenString &string, fpreal t, int parm_group=1)
 
void setUndoSavedFlag ()
 
void setAutoTakeUndoSavedFlag ()
 
void appendMultiParms (const PRM_Multi *multiparmowner, PRM_Template *templ, int num, bool spare, const UT_IntArray &instance, UT_ValArray< PRM_Parm * > &newparms)
 
void removeAndDestroyParm (int index)
 
void insertMultiParmItem (int index, int i)
 
void removeMultiParmItem (int index, int i)
 
PRM_ParmOwnergetParmOwner () const
 
PRM_PresetInfogetPresetInfo () const
 
void clearParmOwner ()
 
bool checkMultiParmInstance (const char *parmname, bool do_owner_init)
 
bool setChannelAlias (PRM_Parm &parm, int subindex, const char *chan_alias)
 
int64 getMemoryUsage (bool inclusive) const
 
unsigned long getAddRemoveCount () const
 
void setAddRemoveCount (unsigned long count)
 
DEP_MicroNodeparmMicroNode (int parm_idx, int vi)
 
bool hasParmMicroNode (int parm_idx) const
 
void getParmMicroNodes (DEP_MicroNodeList &micronodes) const
 Get all parm micronodes for the entire parm list. More...
 
void propagateDirtyParmMicroNodes (int parm_index, DEP_MicroNode::Visitor client_visit, DEP_MicroNode *parmlist_micronode, bool force)
 
void clearMicroNodeInputs ()
 
void getParmInputList (DEP_MicroNodeList &inputs, bool cooking_only=false) const
 
int getNumParmInputs () const
 
void getParmOutputList (DEP_MicroNodeList &outputs, bool cooking_only=false) const
 
void dumpMicroNodes (std::ostream &os, bool as_DOT, int indent_level=0) const
 
int64 getMicroNodesMemoryUsage () const
 
PRM_ParmgetParmPtrInst (const char *theparmname, const int *instance, int nest_level) const
 
PRM_ParmgetParmPtrInst (const char *theparmname, const int *instance, int nest_level, int &theparmidx) const
 
void saveChannelAliases (std::ostream &os, int binary)
 
bool loadChannelAliases (UT_IStream &is, const char *path)
 
void evalStringRaw (UT_String &value, const char *pn, int vi, fpreal t)
 
void evalString (UT_String &value, const char *pn, int vi, fpreal t)
 
void setString (const UT_String &value, CH_StringMeaning meaning, const char *pn, int vi, fpreal t, bool propagate)
 
int evalInt (const char *pn, int vi, fpreal t)
 
void setInt (int value, const char *pn, int vi, fpreal t, bool propagate)
 
fpreal evalFloat (const char *pn, int vi, fpreal t)
 
void setFloat (fpreal value, const char *pn, int vi, fpreal t, bool propagate)
 

Static Public Member Functions

static void beginLoading ()
 
static void endLoading ()
 
static bool isLoading ()
 
static PRM_ORCallbackgetORCallback (void)
 
static void setORCallback (PRM_ORCallback *impl)
 
static void removeOpSharedInfo (const char *optoken)
 
static void renameOpSharedInfo (const char *oldoptoken, const char *newoptoken)
 

Detailed Description

Definition at line 73 of file PRM_ParmList.h.

Constructor & Destructor Documentation

PRM_ParmList::PRM_ParmList ( PRM_Template thetemplates,
CH_Collection thechgroupptr,
PRM_ParmOwner node,
PRM_PresetInfo presetinfo,
char *  optype,
bool  clear_channels 
)
PRM_ParmList::PRM_ParmList ( PRM_ParmList thesrcptr,
PRM_Template thenewtemplate,
PRM_ParmOwner node,
PRM_PresetInfo presetinfo,
char *  optype,
bool  leavedefaultsunchanged 
)

Constructor used to make a new parm list when loading a new PRM_Template. This assumes that the channel collection and variables remains the same.

PRM_ParmList::~PRM_ParmList ( )

Member Function Documentation

int PRM_ParmList::addChannel ( const char *  name)
int PRM_ParmList::allDefaults ( ) const

returns 1 if all the parms in the list are at their default values returns 0 otherwise

void PRM_ParmList::appendMultiParms ( const PRM_Multi *  multiparmowner,
PRM_Template templ,
int  num,
bool  spare,
const UT_IntArray instance,
UT_ValArray< PRM_Parm * > &  newparms 
)
int PRM_ParmList::areAllFlagsClean ( ) const
static void PRM_ParmList::beginLoading ( )
static
void PRM_ParmList::buildDelayedDefaults ( bool  clear_channels = true)
int PRM_ParmList::canAccess ( unsigned  mask = PRM_WRITE_OK,
const PRM_Type type = PRM_TYPE_ZERO 
) const
int PRM_ParmList::canAccessCheckingOnlyAssetMask ( unsigned  mask = PRM_WRITE_OK,
const PRM_Type type = PRM_TYPE_ZERO 
) const
int PRM_ParmList::canAccessIgnoringAssetMask ( unsigned  mask = PRM_WRITE_OK,
const PRM_Type type = PRM_TYPE_ZERO 
) const
int PRM_ParmList::changeString ( const char *  from,
const char *  to,
bool  fullword 
)
int PRM_ParmList::channelPtrModified ( const char *  name)
bool PRM_ParmList::checkMultiParmInstance ( const char *  parmname,
bool  do_owner_init 
)

checkMultiParmInstance() will return true if the given parm name matches a multi-parm instance name. If the multi-parm instance isn't created yet, then it will be created before this function returns. In that case, do_owner_init specifies if the new instance should be initialized.

int PRM_ParmList::checkTimeDependence ( bool  evaluate_channels = false)

If the parm list is not already flagged as time dependent then checkTimeDependence will scan the parms for time dependencies and return the new time dependence flag.

Note
Expressions will not be flagged as time dependent until they're evaluated. So, if it's possible that the channels have not been evaluated, set evaluate_channels to true.
void PRM_ParmList::clearAllDirtyFlags ( )
void PRM_ParmList::clearAllUndoSavedFlags ( )
void PRM_ParmList::clearAndDestroyChannels ( )
void PRM_ParmList::clearMicroNodeInputs ( )
void PRM_ParmList::clearParmOwner ( )
void PRM_ParmList::clearSendExtraEvent ( )
inline

Definition at line 281 of file PRM_ParmList.h.

void PRM_ParmList::dumpMicroNodes ( std::ostream &  os,
bool  as_DOT,
int  indent_level = 0 
) const
static void PRM_ParmList::endLoading ( )
static
fpreal PRM_ParmList::evalFloat ( const char *  pn,
int  vi,
fpreal  t 
)

Convenience functions for evaluating and setting parameters

int PRM_ParmList::evalInt ( const char *  pn,
int  vi,
fpreal  t 
)

Convenience functions for evaluating and setting parameters

void PRM_ParmList::evalString ( UT_String value,
const char *  pn,
int  vi,
fpreal  t 
)

Convenience functions for evaluating and setting parameters

void PRM_ParmList::evalStringRaw ( UT_String value,
const char *  pn,
int  vi,
fpreal  t 
)

Convenience functions for evaluating and setting parameters

fpreal PRM_ParmList::findNextKey ( fpreal  theoldtime)
fpreal PRM_ParmList::findPrevKey ( fpreal  theoldtime)
int PRM_ParmList::findString ( const char *  str,
bool  fullword,
bool  usewildcards 
) const
unsigned long PRM_ParmList::getAddRemoveCount ( ) const
inline

Definition at line 324 of file PRM_ParmList.h.

unsigned PRM_ParmList::getAssetPermissionMask ( ) const
inline

Definition at line 209 of file PRM_ParmList.h.

CH_Collection* PRM_ParmList::getChannelGroupPtr ( ) const
inline

Definition at line 100 of file PRM_ParmList.h.

PRM_ChanState PRM_ParmList::getChanState ( fpreal  time)
int PRM_ParmList::getCookTimeDependent ( ) const
inline

Definition at line 262 of file PRM_ParmList.h.

int PRM_ParmList::getEntries ( ) const
inline

Definition at line 94 of file PRM_ParmList.h.

fpreal PRM_ParmList::getEvalTime ( int  thread) const
void PRM_ParmList::getMagicString ( UT_TokenString string,
fpreal  t,
int  parm_group = 1 
)

Return a unique identifier for the current parameter settings. If this is called outside of a cook, place a PRM_AutoBlockErrors around the call.

int64 PRM_ParmList::getMemoryUsage ( bool  inclusive) const
int64 PRM_ParmList::getMicroNodesMemoryUsage ( ) const
int PRM_ParmList::getNumParmInputs ( ) const
static PRM_ORCallback* PRM_ParmList::getORCallback ( void  )
inlinestatic

Definition at line 265 of file PRM_ParmList.h.

int PRM_ParmList::getParmIndex ( const PRM_Parm parm) const
int PRM_ParmList::getParmIndex ( const char *  parmname) const
int PRM_ParmList::getParmIndex ( const char *  channel_name,
int subidx,
bool  allow_alias = true 
) const
inline

Definition at line 141 of file PRM_ParmList.h.

int PRM_ParmList::getParmIndexFromChannel ( const char *  channel,
int vecidx,
bool  allow_alias 
) const
void PRM_ParmList::getParmInputList ( DEP_MicroNodeList inputs,
bool  cooking_only = false 
) const
void PRM_ParmList::getParmMicroNodes ( DEP_MicroNodeList micronodes) const

Get all parm micronodes for the entire parm list.

void PRM_ParmList::getParmOutputList ( DEP_MicroNodeList outputs,
bool  cooking_only = false 
) const
PRM_ParmOwner* PRM_ParmList::getParmOwner ( ) const
inline

Definition at line 304 of file PRM_ParmList.h.

PRM_Parm* PRM_ParmList::getParmPtr ( const char *  theparmname,
int theparmidx 
)
PRM_Parm* PRM_ParmList::getParmPtr ( const char *  theparmname)
const PRM_Parm* PRM_ParmList::getParmPtr ( const char *  theparmname) const
PRM_Parm* PRM_ParmList::getParmPtr ( const PRM_Name name)
const PRM_Parm* PRM_ParmList::getParmPtr ( const PRM_Name name) const
PRM_Parm* PRM_ParmList::getParmPtr ( const int  theindex)
inline

Definition at line 123 of file PRM_ParmList.h.

const PRM_Parm* PRM_ParmList::getParmPtr ( const int  theindex) const
inline

Definition at line 129 of file PRM_ParmList.h.

PRM_Parm* PRM_ParmList::getParmPtrFromChannel ( const char *  channel,
int vecidx = 0 
) const
PRM_Parm* PRM_ParmList::getParmPtrInst ( const char *  theparmname,
const int instance,
int  nest_level 
) const
PRM_Parm* PRM_ParmList::getParmPtrInst ( const char *  theparmname,
const int instance,
int  nest_level,
int theparmidx 
) const
unsigned PRM_ParmList::getPermissions ( ) const
inline

Definition at line 200 of file PRM_ParmList.h.

PRM_PresetInfo* PRM_ParmList::getPresetInfo ( ) const
inline

Definition at line 305 of file PRM_ParmList.h.

int PRM_ParmList::getSendExtraEvent ( )
inline

Definition at line 279 of file PRM_ParmList.h.

int PRM_ParmList::getTimeDependent ( ) const
inline

Definition at line 261 of file PRM_ParmList.h.

unsigned PRM_ParmList::getUserMask ( ) const
inline

Definition at line 197 of file PRM_ParmList.h.

void PRM_ParmList::hardenChanges ( fpreal  time,
bool  forceflag = 0,
const char *  patt = 0,
CH_ChannelRefList list = 0 
)
int PRM_ParmList::hasAnyChannels ( )
bool PRM_ParmList::hasChannelAliases ( ) const

Returns true if any of our parms have an alias and false otherwise

bool PRM_ParmList::hasParmMicroNode ( int  parm_idx) const
void PRM_ParmList::insertMultiParmItem ( int  index,
int  i 
)
static bool PRM_ParmList::isLoading ( )
static
bool PRM_ParmList::load ( UT_IStream is,
const char *  path,
PRM_ParmList obsoleteparms 
)
bool PRM_ParmList::loadChannelAliases ( UT_IStream is,
const char *  path 
)

Methods to load and save channel aliases

void PRM_ParmList::loadUndoData ( const PRM_UndoDataList data,
const char *  path,
PRM_ParmList obsoleteparms 
)
bool PRM_ParmList::notifyVarChange ( const char *  varname)
DEP_MicroNode& PRM_ParmList::parmMicroNode ( int  parm_idx,
int  vi 
)
void PRM_ParmList::popVariables ( )
void PRM_ParmList::propagateDirtyParmMicroNodes ( int  parm_index,
DEP_MicroNode::Visitor  client_visit,
DEP_MicroNode parmlist_micronode,
bool  force 
)
void PRM_ParmList::pushVariables ( )
void PRM_ParmList::reloadChannelPtrs ( )
void PRM_ParmList::removeAndDestroyParm ( int  index)
void PRM_ParmList::removeMultiParmItem ( int  index,
int  i 
)
static void PRM_ParmList::removeOpSharedInfo ( const char *  optoken)
static
static void PRM_ParmList::renameOpSharedInfo ( const char *  oldoptoken,
const char *  newoptoken 
)
static
void PRM_ParmList::revertToDefaults ( fpreal  time)
void PRM_ParmList::revertValuesToFactoryDefaults ( )
void PRM_ParmList::save ( std::ostream &  os,
int  binary,
bool  compiled 
) const
void PRM_ParmList::saveChannelAliases ( std::ostream &  os,
int  binary 
)

Methods to load and save channel aliases

void PRM_ParmList::saveSingle ( PRM_Parm ,
std::ostream &  os,
int  binary 
) const
void PRM_ParmList::saveSingleUndoData ( PRM_Parm parm,
PRM_UndoDataList data 
)
void PRM_ParmList::saveUndoData ( PRM_UndoDataList data)
void PRM_ParmList::sendChangeEvent ( CH_CHANGE_TYPE  what,
PRM_Parm who = 0 
)
void PRM_ParmList::setAddRemoveCount ( unsigned long  count)
inline

Definition at line 326 of file PRM_ParmList.h.

void PRM_ParmList::setAssetPermissionMask ( unsigned  mask)
inline

Definition at line 211 of file PRM_ParmList.h.

void PRM_ParmList::setAutoTakeUndoSavedFlag ( )
inline

Definition at line 290 of file PRM_ParmList.h.

bool PRM_ParmList::setChannelAlias ( PRM_Parm parm,
int  subindex,
const char *  chan_alias 
)

This method is used to alias a channel name to a another name Returns true if successful and false otherwise. NOTE: you should not need to use this directly, you should instead call the OP_Node version.

void PRM_ParmList::setChannelGroupPtr ( CH_Collection thechgroupptr)
inline

Definition at line 98 of file PRM_ParmList.h.

void PRM_ParmList::setCookTimeDependent ( int  onOff)
inline

Definition at line 258 of file PRM_ParmList.h.

void PRM_ParmList::setEventHandler ( void data,
void(*)(void *, CH_CHANGE_TYPE, int handler 
)
inline

Definition at line 241 of file PRM_ParmList.h.

void PRM_ParmList::setFloat ( fpreal  value,
const char *  pn,
int  vi,
fpreal  t,
bool  propagate 
)

Convenience functions for evaluating and setting parameters

void PRM_ParmList::setInt ( int  value,
const char *  pn,
int  vi,
fpreal  t,
bool  propagate 
)

Convenience functions for evaluating and setting parameters

static void PRM_ParmList::setORCallback ( PRM_ORCallback impl)
inlinestatic

Definition at line 266 of file PRM_ParmList.h.

void PRM_ParmList::setPermissions ( unsigned  mask)
inline

Definition at line 201 of file PRM_ParmList.h.

void PRM_ParmList::setSendExtraEvent ( )
inline

Definition at line 280 of file PRM_ParmList.h.

void PRM_ParmList::setString ( const UT_String value,
CH_StringMeaning  meaning,
const char *  pn,
int  vi,
fpreal  t,
bool  propagate 
)

Convenience functions for evaluating and setting parameters

void PRM_ParmList::setTimeDependent ( int  onOff)
inline

Definition at line 256 of file PRM_ParmList.h.

void PRM_ParmList::setUndoSavedFlag ( )
inline

Definition at line 289 of file PRM_ParmList.h.

void PRM_ParmList::setUserMask ( unsigned  m)
inline

Definition at line 198 of file PRM_ParmList.h.

void PRM_ParmList::updateFromOldTemplate ( PRM_ParmList oldlist)
void PRM_ParmList::updateSpareParmTemplates ( PRM_Template newtemplates,
bool  leavedefaultsunchanged 
)

The documentation for this class was generated from the following file: