HDK
|
#include <SIM_DopDescription.h>
Public Types | |
typedef int(* | SIM_ComputeLiveInput )(const OP_Node *node, double time) |
typedef void(* | SIM_ObsoleteParmResolver )(OP_Node *node, PRM_ParmList *obsolete_parms) |
Callback to handle any obsolete parameters. More... | |
typedef void(* | SIM_SyncNodeVersion )(OP_Node *node, const char *old_version, const char *cur_version, bool *node_deleted) |
Callback to update old nodes to the latest version. More... | |
typedef bool(* | SIM_GetOpVersion )(const OP_Operator &op, UT_String &version) |
Callback to provide a custom version string for the operator. More... | |
typedef bool(* | SIM_UpdateParmsFlags )(OP_Node *node) |
Callback to hide or disable parameters. More... | |
Public Member Functions | |
SIM_DopDescription (bool createdop, const char *dopname, const char *dopenglish, const char *dataname, const char *datatypename, const PRM_Template *templates) | |
~SIM_DopDescription () | |
The SIM_DopDescription destructor. More... | |
bool | getCreateDop () const |
const UT_String & | getDopName () const |
const UT_String & | getDopEnglish () const |
const UT_String & | getDataName () const |
const UT_String & | getDataTypeName () const |
const char * | getBypassDataTypeName () const |
void | setBypassDataTypeName (const char *name) |
const PRM_Template * | getTemplates () const |
bool | getPureApplyData () const |
void | setPureApplyData (bool pureapply) |
void | setLCDDataTypeName (const char *lcddatatype) |
const UT_String & | getLCDDataTypeName () const |
Set the "lowest common denominator" data type name. More... | |
void | setDefaultShareData (int share) |
Set the Share Data parameter default. The default if off. More... | |
int | getDefaultShareData () const |
Get the Share Data parameter default. More... | |
void | setDefaultUniqueDataName (int unique) |
Set the Unique Data Name parameter default. The default is off. More... | |
int | getDefaultUniqueDataName () const |
Get the Unique Data Name parameter default. More... | |
void | setCreatePerParmUpdateMenus (bool createmenus) |
Set whether each parm gets an update menu. The default is on. More... | |
bool | getCreatePerParmUpdateMenus () const |
get whether each parm gets an update menu. More... | |
void | setGuideTemplates (const PRM_Template *tplates) |
Set the templates to use for controlling guide geometry. More... | |
const PRM_Template * | getGuideTemplates () const |
Get the templates to use for controlling guide geometry. More... | |
void | setObsoleteTemplates (PRM_Template *tplates) |
Set the templates to use for obsolete parameters. More... | |
PRM_Template * | getObsoleteTemplates () const |
Get the templates to use for obsolete parameters. More... | |
void | setObsoleteParmResolver (SIM_ObsoleteParmResolver resolver) |
Set the callback to handle any obsolete parameters. More... | |
void | resolveObsoleteParms (OP_Node *node, PRM_ParmList *obsolete_parms) const |
Launch the callback to handle the obsolete parameters. More... | |
void | setSyncNodeVersion (SIM_SyncNodeVersion callback) |
Set the callback to update nodes to the latest version. More... | |
void | syncNodeVersion (OP_Node *node, const char *old_version, const char *cur_version, bool *node_deleted) const |
Launch the callback to update nodes to the latest version. More... | |
void | setOpVersionCallback (SIM_GetOpVersion callback) |
Set the callback to provide a custom version string for the operator. More... | |
bool | getOpVersion (const OP_Operator &op, UT_String &version) const |
Launch the callback to provide a custom version string for the operator. More... | |
void | setUpdateParmsFlags (SIM_UpdateParmsFlags callback) |
Set the callback to hide or disable parameters. More... | |
bool | updateParmsFlags (OP_Node *node) const |
Run the callback to hide or disable parameters. More... | |
bool | getInitialTemplateFlag () const |
void | setInitialTemplateFlag (bool flagval) |
int | computeLiveInput (int defval, const OP_Node *node, double time) const |
void | setLiveInputComputer (SIM_ComputeLiveInput computer) |
void | getDescriptiveNameParm (UT_String &parm) const |
void | setDescriptiveNameParm (const char *parm) |
This class is used to create a new DOP type based on a SIM_Data subclass. This class stores the information that describes the automatic DOP that should be created to represent this data type. An automatic DOP outputs an instance of a SIM_Data subclass to be attached to one or more objects.
Definition at line 23 of file SIM_DopDescription.h.
Returns the live data input. Note that this unfortuantely does not often correspond to the wire index! -1 means all inputs are enabled. -2 means none of them are. 0 or more mean only that input is enabled.
Definition at line 30 of file SIM_DopDescription.h.
typedef bool(* SIM_DopDescription::SIM_GetOpVersion)(const OP_Operator &op, UT_String &version) |
Callback to provide a custom version string for the operator.
Definition at line 42 of file SIM_DopDescription.h.
typedef void(* SIM_DopDescription::SIM_ObsoleteParmResolver)(OP_Node *node, PRM_ParmList *obsolete_parms) |
Callback to handle any obsolete parameters.
Definition at line 33 of file SIM_DopDescription.h.
typedef void(* SIM_DopDescription::SIM_SyncNodeVersion)(OP_Node *node, const char *old_version, const char *cur_version, bool *node_deleted) |
Callback to update old nodes to the latest version.
Definition at line 37 of file SIM_DopDescription.h.
typedef bool(* SIM_DopDescription::SIM_UpdateParmsFlags)(OP_Node *node) |
Callback to hide or disable parameters.
Definition at line 45 of file SIM_DopDescription.h.
SIM_DopDescription::SIM_DopDescription | ( | bool | createdop, |
const char * | dopname, | ||
const char * | dopenglish, | ||
const char * | dataname, | ||
const char * | datatypename, | ||
const PRM_Template * | templates | ||
) |
The SIM_DopDescription constructor. All features of this class are set on construction and cannot be altered once set. Generally this class will be created in a static member function of some SIM_Data subclass and used when registering the data factory. See the various data access functions for a desription of what each constructor argument means.
SIM_DopDescription::~SIM_DopDescription | ( | ) |
The SIM_DopDescription destructor.
|
inline |
Definition at line 155 of file SIM_DopDescription.h.
|
inline |
Returns the name of the SIM_Data to be created if the node is bypassed. If none is given, the data will be deleted.
Definition at line 84 of file SIM_DopDescription.h.
bool SIM_DopDescription::getCreateDop | ( | ) | const |
Returns true if an automatic DOP should be created. Many SIM_Data subclasses are for internal use only and do not want to be created explicitly by users. In that case this value should be set to false, in which case all other values will be ignored.
|
inline |
get whether each parm gets an update menu.
Definition at line 118 of file SIM_DopDescription.h.
const UT_String& SIM_DopDescription::getDataName | ( | ) | const |
Returns the name of the data within the simulation object. This name should be a unique value that specifies the name under which this data is stored in each simulation object.
const UT_String& SIM_DopDescription::getDataTypeName | ( | ) | const |
int SIM_DopDescription::getDefaultShareData | ( | ) | const |
Get the Share Data parameter default.
int SIM_DopDescription::getDefaultUniqueDataName | ( | ) | const |
Get the Unique Data Name parameter default.
Definition at line 163 of file SIM_DopDescription.h.
const UT_String& SIM_DopDescription::getDopEnglish | ( | ) | const |
Returns the descriptive name for the DOP operator type. This is the value that appears in toolbars to represent the automatic DOP operator type created from this DOP description.
const UT_String& SIM_DopDescription::getDopName | ( | ) | const |
Returns the name of the automatic DOP operator type. This name must be unique among DOP operator types.
const PRM_Template* SIM_DopDescription::getGuideTemplates | ( | ) | const |
Get the templates to use for controlling guide geometry.
|
inline |
Definition at line 150 of file SIM_DopDescription.h.
const UT_String& SIM_DopDescription::getLCDDataTypeName | ( | ) | const |
Set the "lowest common denominator" data type name.
PRM_Template* SIM_DopDescription::getObsoleteTemplates | ( | ) | const |
Get the templates to use for obsolete parameters.
bool SIM_DopDescription::getOpVersion | ( | const OP_Operator & | op, |
UT_String & | version | ||
) | const |
Launch the callback to provide a custom version string for the operator.
|
inline |
Returns if this data should have no grey inputs, but instead only green inputs so it has to go through an apply stage.
Definition at line 93 of file SIM_DopDescription.h.
const PRM_Template* SIM_DopDescription::getTemplates | ( | ) | const |
Returns an array of PRM_Templates for setting options. The values from each parameter are placed into a SIM_Options, which is then sent to the SIM_Data::setParameters() function to set up the SIM_Data class based on the parameter values.
void SIM_DopDescription::resolveObsoleteParms | ( | OP_Node * | node, |
PRM_ParmList * | obsolete_parms | ||
) | const |
Launch the callback to handle the obsolete parameters.
|
inline |
Definition at line 85 of file SIM_DopDescription.h.
|
inline |
Set whether each parm gets an update menu. The default is on.
Definition at line 115 of file SIM_DopDescription.h.
Set the Share Data parameter default. The default if off.
Set the Unique Data Name parameter default. The default is off.
|
inline |
Definition at line 164 of file SIM_DopDescription.h.
void SIM_DopDescription::setGuideTemplates | ( | const PRM_Template * | tplates | ) |
Set the templates to use for controlling guide geometry.
|
inline |
Definition at line 152 of file SIM_DopDescription.h.
void SIM_DopDescription::setLCDDataTypeName | ( | const char * | lcddatatype | ) |
Set the "lowest common denominator" data type name. This is the data type that DOP nodes compare existing data against to see if the requested data already exists and is of a "compatible" type. This affects whether the DOP node uses its "set initial" parameters or only its "set always" parameters. This defaults to the actual data type name.
|
inline |
Definition at line 161 of file SIM_DopDescription.h.
void SIM_DopDescription::setObsoleteParmResolver | ( | SIM_ObsoleteParmResolver | resolver | ) |
Set the callback to handle any obsolete parameters.
void SIM_DopDescription::setObsoleteTemplates | ( | PRM_Template * | tplates | ) |
Set the templates to use for obsolete parameters.
void SIM_DopDescription::setOpVersionCallback | ( | SIM_GetOpVersion | callback | ) |
Set the callback to provide a custom version string for the operator.
|
inline |
Definition at line 94 of file SIM_DopDescription.h.
void SIM_DopDescription::setSyncNodeVersion | ( | SIM_SyncNodeVersion | callback | ) |
Set the callback to update nodes to the latest version.
void SIM_DopDescription::setUpdateParmsFlags | ( | SIM_UpdateParmsFlags | callback | ) |
Set the callback to hide or disable parameters.
void SIM_DopDescription::syncNodeVersion | ( | OP_Node * | node, |
const char * | old_version, | ||
const char * | cur_version, | ||
bool * | node_deleted | ||
) | const |
Launch the callback to update nodes to the latest version.
bool SIM_DopDescription::updateParmsFlags | ( | OP_Node * | node | ) | const |
Run the callback to hide or disable parameters.