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

#include <VOP_Operator.h>

+ Inheritance diagram for VOP_Operator:

Public Member Functions

 VOP_Operator (const char *name, const char *english, OP_Constructor construct, PRM_Template *templates, const char *child_table_name, unsigned min_sources, unsigned max_sources, const char *vopnetMask, CH_LocalVariable *variables=0, unsigned flags=0, unsigned num_outputs=1)
 
 ~VOP_Operator () override
 
OP_SpecificDatagetOpSpecificData () override
 
const OP_SpecificDatagetOpSpecificData () const override
 
unsigned maxOutputs () override
 
bool wantsInputEditor () const override
 
bool wantsParmOrderEditor () const override
 
bool wantsOutputNameEditor () const override
 
bool wantsParentInputs () const override
 
- Public Member Functions inherited from OP_Operator
 OP_Operator (const char *name, const char *english, OP_Constructor construct, PRM_Template *templates, unsigned min_sources, unsigned max_sources=9999, CH_LocalVariable *variables=0, unsigned flags=0, const char **inputlabels=0, int maxoutputs=1, const char *tab_submenu_path=0)
 Note: The 'inputlabels' array is expected to be null-terminated. More...
 
 OP_Operator (const char *name, const char *english, OP_Constructor construct, OP_TemplatePair *template_pair, unsigned min_sources, unsigned max_sources=9999, OP_VariablePair *variable_pair=0, unsigned flags=0, const char **inputlabels=0, int maxoutputs=1, const char *tab_submenu_path=0)
 
 OP_Operator (const char *name, const char *english, OP_Constructor construct, PRM_Template *templates, const char *child_table_name, unsigned min_sources, unsigned max_sources=9999, CH_LocalVariable *variables=0, unsigned flags=0, const char **inputlabels=0, int maxoutputs=1, const char *tab_submenu_path=0)
 
 OP_Operator (const char *name, const char *english, OP_Constructor construct, OP_TemplatePair *template_pair, const char *child_table_name, unsigned min_sources, unsigned max_sources=9999, OP_VariablePair *variable_pair=0, unsigned flags=0, const char **inputlabels=0, int maxoutputs=1, const char *tab_submenu_path=0)
 
virtual ~OP_Operator ()
 
OP_NodeconstructNode (OP_Network *net, const char *name)
 
int getNumActiveNodes () const
 
OP_NodegetActiveNode (int i) const
 
void nodeDestroyed (OP_Node *node)
 
const UT_StringHoldergetOriginalName () const
 
void getOriginalTableAndName (UT_WorkBuffer &name) const
 
void getOriginalTableAndName (UT_String &name) const
 
const UT_StringHoldergetName () const
 
void getTableAndName (UT_WorkBuffer &name) const
 
void getTableAndName (UT_String &name) const
 
const UT_StringHoldergetEnglish () const
 
virtual UT_Color getDefaultColor () const
 
virtual const UT_StringHoldergetDefaultShape () const
 
virtual bool getHDKHelp (UT_String &) const
 
virtual bool getOpHelpURL (UT_String &url)
 
virtual bool getOpTabSubMenuPath (UT_String &tab_submenu_path)
 
void setOpTabSubMenuPath (const char *tab_submenu_path)
 
bool getOTLHelp (UT_String &str)
 
bool hasPotentialEditableSubNodes ()
 
void getEditableSubNodes (UT_String &pattern)
 
const UT_StringHoldergetMessageSubNodes () const
 
void getDiveTarget (UT_String &divetarget)
 
void getDescriptiveParmName (UT_String &descrparm)
 
void getDefaultState (UT_String &statename)
 
void getFunctionName (UT_String &function_name)
 
void getSecondaryFunctionsNames (UT_StringMap< UT_StringHolder > &functions)
 
void getComment (UT_String &comment)
 
virtual bool getVersion (UT_String &version)
 
void getHelpFileDirAndName (UT_String &script_dir, UT_String &name)
 
void getDefinitionSource (UT_String &defsource) const
 
OP_NodegetDefiningNetwork () const
 
const UT_StringHoldergetIndexPath () const
 
const UT_StringHoldergetIndexFile () const
 
bool getScriptIsSubnet () const
 
bool getScriptIsVex () const
 
bool getScriptIsRsl () const
 
VEX_ContextType getVexContextType () const
 
RSL_ContextType getRslContextType () const
 
time_t getModTime () const
 
bool getIsDummyDefinition () const
 
bool getScriptIsPython () const
 
void setScriptIsPython (bool is_python)
 
const UT_StringHoldergetExtraInfo () const
 
const OP_ExtraInfoBuffergetExtraInfoBuffer () const
 
void setOTLDefinition (const OP_OTLDefinition &definition)
 
const OP_OTLDefinitiongetOTLDefinition () const
 
void setOTLLibrary (OP_OTLLibrary *library)
 
OP_OTLLibrarygetOTLLibrary ()
 
virtual bool getSectionData (const UT_StringRef &name, UT_StringHolder &value) const
 
virtual bool hasSectionData (const UT_StringRef &name) const
 
bool hasContentsSection ()
 
FS_IndexFilegetOTLIndexFile (bool check_timestamp=true)
 
FS_IndexFileHandle getOTLIndexFilePtr (bool check_timestamp=true)
 
UT_StringHolder getContentsSection ()
 
virtual void clearOTLIndexFile ()
 
FS_IndexFilecreateDefaultOTLIndexFile () const
 
FS_IndexFilecreateOTLIndexFile (bool reservedsectionsonly, UT_StringArray *externalfiles)
 
void getDefinitionSectionName (UT_String &sectname) const
 
void listContainedOperators (UT_StringSet &contents_list)
 List all operators found in the contents section. More...
 
const char * getIconName () const
 
void setIconName (const char *name)
 
void setDefaultIconName ()
 
unsigned minInputs () const
 
unsigned maxInputs () const
 
OP_SpareParmsloadSpareParms (UT_IStream &is)
 
virtual bool hasLoadedParmTemplates () const
 
virtual int updateParmTemplates ()
 
virtual void forceUpdateParmTemplates ()
 
PRM_TemplategetParmTemplates ()
 
PRM_ScriptImportsgetParmTemplateImports ()
 
PRM_TemplategetLayoutParmTemplates ()
 
PRM_ScriptImportsgetLayoutParmTemplateImports ()
 
virtual const PRM_TemplategetBaseParmTemplates ()
 
PRM_TemplategetBaseOverrideLayoutParmTemplates ()
 
virtual PRM_TemplategetObsoleteTemplates ()
 
void setObsoleteTemplates (PRM_Template *tmpl)
 
bool getOverrideLayoutParmTemplateFile (UT_String &ds_path) const
 
CH_LocalVariablegetVariable (int i) const
 
CH_LocalVariablegetVariable (const char *name) const
 
CH_LocalVariablegetVariables () const
 
int getVariableCount () const
 
void resetVariables (OP_VariablePair *variable_pair)
 
bool isNetwork () const
 
bool isGenerator () const
 
bool isScriptedOp () const
 
bool isCustomDSO () const
 
bool unorderedInputs () const
 
bool isManagementOp () const
 
bool isOutputOp () const
 
bool hasEditableInputData () const
 
bool getIsPrimarySubnetType () const
 
bool isCreatingNode () const
 
bool isChangingParmTemplates () const
 
bool hasNodeLoadingContentsSection () const
 
void beginLoadingContentsSectionForNode ()
 
void endLoadingContentsSectionForNode ()
 
bool shouldPreserve () const
 
virtual int compareOperator (const OP_Operator *other, int method) const
 
void changeParmTemplate (PRM_Template *tp)
 
unsigned getPermissionMask () const
 
virtual void getRefreshPICommands (OP_Node *, std::ostream &)
 
virtual bool wantsParametersAnimatable () const
 
const OP_InputDataEditorConfigExgetInputDataEditorConfigEx () const
 
void setInputDataEditorConfigEx (const OP_InputDataEditorConfigEx &config)
 
void setInputDataEditorConfig (const OP_InputDataEditorConfig &config)
 
virtual const char * getOperatorShortHelpString ()
 
virtual void getOperatorSpecificInfoText (int verbose, UT_WorkBuffer &text)
 
void fillInfoTree (UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
 
virtual void fillInfoTreeOperatorSpecific (UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
 
const char * getTableName () const
 
OP_OperatorTablegetTable () const
 
const UT_StringHoldergetChildTableName () const
 
OP_OperatorTablegetChildOperatorTable () const
 
OP_OTLLicenseType getLicense ()
 
void setDefinition (const char *def)
 
void setEnglish (const char *english)
 
void informOfTabMenuFlagChange ()
 
virtual void setName (const char *name)
 
void setMinInputs (int inputs)
 
void setMaxInputs (int inputs)
 
void setIsGenerator (bool isgen)
 
void updatePresetInfo ()
 
PRM_PresetInfogetPresetInfo ()
 
bool runEventScript (const char *event, OP_Node *node_arg=nullptr, bool full_path=false, UT_Options *extra_args=nullptr, bool *node_deleted_by_script=nullptr)
 
PY_EvaluationContextgetPythonModuleDicts ()
 
bool hasLoadedPythonModuleSection () const
 
void loadPythonModuleSection (bool force=false)
 
PY_EvaluationContextgetViewerStateModuleDicts ()
 
bool hasLoadedViewerStateModuleSection () const
 
void loadViewerStateModuleSection (bool force=false)
 
PY_EvaluationContextgetViewerHandleModuleDicts ()
 
bool hasLoadedViewerHandleModuleSection () const
 
void loadViewerHandleModuleSection (bool force=false)
 
void clearEventScriptPathCache ()
 
void getCachedEventScriptPaths (UT_StringArray &events, UT_StringArray &paths, bool only_nonempty) const
 
bool isThreadSafe () const
 
void setIsThreadSafe (bool is_safe)
 
bool isCompiled ()
 
bool isBlackBoxed ()
 Returns true if this operator is black boxed, and false otherwise. More...
 
void constructIndexFileSectionPath (UT_String &path, const char *opdef_or_oplib, const char *section_name) const
 
void constructIndexFileSectionPath (UT_String &path, const char *opdef_or_oplib, const UT_StringArray &section_names) const
 
void setNumOrderedInputs (int inputs)
 
int numOrderedInputs () const
 
void setLegacyInputsMap (const char *map)
 
void getLegacyInputsMap (UT_String &map) const
 
const UT_StringArraygetLegacyInputsIndexMap () const
 
const UT_StringHoldergetInputName (int idx) const
 Accessing operator inputs name, label, and reference flag. More...
 
const UT_StringArraygetInputNames () const
 Accessing operator inputs name, label, and reference flag. More...
 
const UT_StringHoldergetInputLabel (int idx) const
 Accessing operator inputs name, label, and reference flag. More...
 
const UT_StringArraygetInputLabels () const
 Accessing operator inputs name, label, and reference flag. More...
 
bool getInputIsReference (int idx) const
 Accessing operator inputs name, label, and reference flag. More...
 
const UT_Array< bool > & getInputAreReferences () const
 Accessing operator inputs name, label, and reference flag. More...
 
virtual bool allowsInputNameEditing () const
 Accessing operator inputs name, label, and reference flag. More...
 
const UT_StringHoldergetOutputLabel (int idx) const
 
const UT_StringArraygetOutputLabels () const
 
void getOpBasedFileName (UT_String &filename)
 
void getOpBasedFileName (UT_WorkBuffer &filename)
 

Static Public Member Functions

static OP_OperatorgetShaderOperator (const UT_StringRef &shader_id)
 
- Static Public Member Functions inherited from OP_Operator
static void clearOperatorHelpCache ()
 
static int loadFromOpType (const char *fname, const char *savedir)
 
static int uninstallOpType (const char *path, const char *tablename, const char *opname, const char *indexpath, const char *indexfile)
 
static void removeHelpCardOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags)
 
static void removeRenameOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags)
 
static void removeIconOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags)
 
static void removeCmdOverrides (UT_FileUtil *fu, const char *path, const char *tablename, const char *opname, int flags)
 
static void getDefaultIconName (const char *tablename, const char *opname, UT_String &iconname)
 
static const char * getCurrentPythonModuleKey ()
 
static const OP_OperatormapSecurityKeyToOperator (const char *key)
 
static void registerPythonModuleKeyClient (void *client)
 
static bool verifyPythonModuleKeyClient (const OP_Operator *op, void *client)
 
static PRM_TemplategetEmptyTemplateList ()
 
static int operatorNameCompare (const OP_Operator *a, const OP_Operator *b)
 

Additional Inherited Members

- Public Types inherited from OP_Operator
enum  OP_OperatorCompare { OP_COMPARE_GEN_ENGLISH = 0, OP_COMPARE_GEN_NAME = 1, OP_COMPARE_ENGLISH = 2, OP_COMPARE_NAME = 3 }
 
- Protected Member Functions inherited from OP_Operator
void notifyUpdateTemplatesSinksOfUpdate ()
 
void notifyUpdateTemplatesSinksOfDelete ()
 
void notifyActiveNodesOfTemplatesUpdate ()
 
void setDescriptiveParmName (const UT_StringHolder &parm)
 
void dirtyParmTemplatesLoaded ()
 
virtual bool loadParmTemplatesSubclass ()
 
bool loadAndCreateLayoutParmTemplates (PRM_ScriptPage *page, DS_Stream &ds_is, PRM_Template *&base_tplates, PRM_Template *&layout_tplates, PRM_ScriptImports *&imports, PRM_Template *&tplates, int base_controls_switcher_index, int base_controls_insert_index, int base_controls_switcher_page_num, PRM_Default *&base_controls_switcher_defaults, bool hide_default_parms)
 Load parameter templates from the specified file stream. More...
 
- Static Protected Member Functions inherited from OP_Operator
static PRM_TemplateaddTemplates (OP_TemplatePair *)
 
static CH_LocalVariableaddVariables (OP_VariablePair *, int &)
 
- Protected Attributes inherited from OP_Operator
PRM_TemplatemyParmTemplates
 
PRM_ScriptImportsmyImports
 
PRM_TemplatemyLayoutParmTemplates
 
PRM_ScriptImportsmyLayoutParmImports
 
PRM_TemplatemyBaseOverrideLayout
 
PRM_TemplatemyBase
 
bool myParmTemplatesLoaded
 
PRM_TemplatemyObsoleteTemplates
 
UT_StringArray myInputNames
 
UT_StringArray myInputLabels
 
UT_StringArray myOutputLabels
 
UT_DeepString myTabSubmenuPath
 
UT_Array< bool > myInputReferences
 
CH_LocalVariablemyVariables
 
int myNvariables
 
UT_StringHolder myChildTableName
 
OP_OTLDefinition myOTLDefinition
 
OP_InputDataEditorConfigEx myInputDataEditorConfig
 
VEX_ContextType myVexContextType
 
RSL_ContextType myRslContextType
 
unsigned myFlags
 
bool myHasContentsSection
 
UT_StringHolder myOverriddenOperatorName
 
UT_SharedPtr< PRM_ScriptPagemyOverrideLayoutParmScriptPage
 

Detailed Description

Examples:
VOP/VOP_CustomContext.C, and VOP/VOP_Switch.C.

Definition at line 19 of file VOP_Operator.h.

Constructor & Destructor Documentation

VOP_Operator::VOP_Operator ( const char *  name,
const char *  english,
OP_Constructor  construct,
PRM_Template templates,
const char *  child_table_name,
unsigned  min_sources,
unsigned  max_sources,
const char *  vopnetMask,
CH_LocalVariable variables = 0,
unsigned  flags = 0,
unsigned  num_outputs = 1 
)
VOP_Operator::~VOP_Operator ( )
override

Member Function Documentation

OP_SpecificData* VOP_Operator::getOpSpecificData ( )
inlineoverridevirtual

Reimplemented from OP_Operator.

Definition at line 35 of file VOP_Operator.h.

const OP_SpecificData* VOP_Operator::getOpSpecificData ( ) const
inlineoverridevirtual

Reimplemented from OP_Operator.

Definition at line 37 of file VOP_Operator.h.

static OP_Operator* VOP_Operator::getShaderOperator ( const UT_StringRef shader_id)
static

Returns VOP operator for the given shader name. Shader name is a generic identifier or opdef path, and the returned operator that shader as a VOP (or nullptr if no such op was found).

unsigned VOP_Operator::maxOutputs ( )
overridevirtual

Reimplemented from OP_Operator.

bool VOP_Operator::wantsInputEditor ( ) const
overridevirtual

Reimplemented from OP_Operator.

bool VOP_Operator::wantsOutputNameEditor ( ) const
overridevirtual

Reimplemented from OP_Operator.

bool VOP_Operator::wantsParentInputs ( ) const
overridevirtual

Reimplemented from OP_Operator.

bool VOP_Operator::wantsParmOrderEditor ( ) const
overridevirtual

Reimplemented from OP_Operator.


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