All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
8 #ifndef __VOPNET_Node_h__
9 #define __VOPNET_Node_h__
11 #include "VOPNET_API.h"
12 #include "VOPNET_Error.h"
13 #include <OP/OP_Network.h>
14 #include <VOP/VOP_CodeGenerator.h>
17 class UT_String;
21 {
22 public:
23  static CH_LocalVariable myVariableList[];
24  static OP_Node *myConstructor(OP_Network* net,
25  const char* name,
26  OP_Operator* entry);
30  bool hasVexShaderParameter(const char *parm_name) override;
32  const char *getChildType() const override;
33  const char *getOpType() const override;
35  static const char *theChildTableName;
36  OP_OpTypeId getChildTypeID() const override;
37  OP_OpTypeId getOpTypeID() const override;
39  void opChanged(OP_EventType reason, void *data=0) override;
41  // Local variables for compiler option evaluation
42  bool evalVariableValue(UT_String &v,int index, int thread) override;
43  bool evalVariableValue(fpreal &v,int i, int thr) override
44  { return OP_Network::evalVariableValue(v, i, thr); }
46  const char *getInternalOpTable() const override;
47  const char *getInternalIndexFile() const;
48  bool getShowOpInTabMenuFlag();
50  OP_Operator *getInternalOperator() const override;
51  void setInternalOperator(OP_Operator *op);
52  const UT_String &getOperatorName() const;
54  // Returns true if there are any instances of any operator types
55  // defined by us or any of our child nodes.
56  bool canDestroyNode() override;
58  // VOPNET's have no outputs
59  unsigned maxOutputs() const override { return 0; }
60  // Absolute width
61  fpreal getW() const override;
62  // Absolute height
63  fpreal getH() const override;
65  // Handle the old parm order parameter by storing it, so it can later
66  // be applied to our output node.
67  void resolveObsoleteParms(PRM_ParmList *obsolete_parms) override;
69  // Get the management ops associated with vopnets...
70  static OP_Operator *getManagementOperator();
71  static OP_Operator *getSOPManagementOperator();
72 #if 0
73  static OP_Operator *getPOPManagementOperator();
74 #endif
75  static OP_Operator *getCHOPManagementOperator();
76  static OP_Operator *getCOP2FilterManagementOperator();
77  static OP_Operator *getCOP2GenManagementOperator();
78  static void addSHOPManagementOperators(OP_OperatorTable *table);
80  static void buildOperatorTable (OP_OperatorTable &table);
82 protected:
83  VOPNET_Node(OP_Network* parent, const char* name,
84  OP_Operator* op);
85  ~VOPNET_Node() override;
89  OP_NodeInfoParms &iparms) override;
91  bool is_child_call=false) override;
92  void addNode(OP_Node *node, int notify=1,
93  int explicitly=1) override;
95  OP_ERROR cookMe(OP_Context &context) override;
97  int &copied_input) override;
99  OP_DataType getCookedDataType() const override;
100  void* getCookedData(OP_Context &) override;
101  void deleteCookedData() override;
102  int saveCookedData(const char *, OP_Context &) override;
103  int saveCookedData(std::ostream &, OP_Context &,
104  int bin = 0) override;
106  const char *getFileExtension(int binary) const override;
108  void addError(VOPNET_ErrorCodes code, const char *msg=0)
109  { UTaddError("VOPNET", code, msg); }
110  void addMessage(VOPNET_ErrorCodes code, const char *msg=0)
111  { UTaddMessage("VOPNET", code, msg); }
112  void addWarning(VOPNET_ErrorCodes code, const char *msg=0)
113  { UTaddWarning("VOPNET", code, msg); }
114  void addFatal(VOPNET_ErrorCodes code, const char *msg=0)
115  { UTaddFatal("VOPNET", code, msg); }
118  {
119  if (getVopCodeGenerator()
121  .requiresUpdate(0.0))
122  {
126  }
127  }
132 };
134 #endif
virtual int saveCookedData(std::ostream &os, OP_Context &, int binary=0)=0
fpreal getH() const override
Node position/scale is used by the UI.
fpreal getW() const override
Node position/scale is used by the UI.
GLuint const GLchar * name
Definition: glew.h:1814
bool evalVariableValue(fpreal &v, int i, int thr) override
Definition: VOPNET_Node.h:43
GLuint index
Definition: glew.h:1814
void addError(VOPNET_ErrorCodes code, const char *msg=0)
Definition: VOPNET_Node.h:108
VOP_CodeGenerator * myCodeGenerator
Definition: VOPNET_Node.h:130
virtual OP_OpTypeId getOpTypeID() const =0
UT_API UT_ErrorSeverity UTaddFatal(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
GLenum GLsizei GLenum GLenum const void * table
Definition: glew.h:4940
virtual const char * getInternalOpTable() const
Definition: OP_Node.h:1173
virtual void finishedLoadingNetwork(bool is_child_call=false)
virtual bool hasVexShaderParameter(const char *parm_name)
Definition: UT_Error.h:25
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
void ensureSpareParmsAreUpdatedSubclass() override
Definition: VOPNET_Node.h:117
void updateOwnerSpareParmLayout(bool allow_update_while_loading=false)
Update the owner network's spare parameter layout.
const GLdouble * v
Definition: glew.h:1391
bool canDestroyNode() override
Return true if it is safe at this time to destroy this node.
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &parms)
UT_API UT_ErrorSeverity UTaddMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual OP_Operator * getInternalOperator() const
Definition: OP_Node.h:1175
virtual OP_ERROR cookMe(OP_Context &context)=0
virtual OP_OperatorFilter * getOperatorFilter()
#define VOPNET_API
Definition: VOPNET_API.h:10
virtual const char * getOpType() const =0
VOP_ExportedParmsManager * exportedParmsManager() const
Return the exported parameters manager.
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void addFatal(VOPNET_ErrorCodes code, const char *msg=0)
Definition: VOPNET_Node.h:114
const GLuint GLenum const void * binary
Definition: glew.h:3502
void opChanged(OP_EventType reason, void *data=0) override
virtual void * getCookedData(OP_Context &)
DEP_MicroNode & eventMicroNode(OP_EventType e)
unsigned maxOutputs() const override
Definition: VOPNET_Node.h:59
Definition: OP_OpTypeId.h:18
*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
virtual OP_DataType getCookedDataType() const =0
virtual const char * getChildType() const
virtual const char * getFileExtension(int binary) const =0
virtual void addNode(OP_Node *node, int notify=1, int explicitly=1)
OP_Operator * myInternalOperator
Definition: VOPNET_Node.h:129
virtual void resolveObsoleteParms(PRM_ParmList *)
fpreal64 fpreal
Definition: SYS_Types.h:277
void addMessage(VOPNET_ErrorCodes code, const char *msg=0)
Definition: VOPNET_Node.h:110
void addWarning(VOPNET_ErrorCodes code, const char *msg=0)
Definition: VOPNET_Node.h:112
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
Definition: OP_Value.h:22
Definition: OP_DataTypes.h:28
virtual OP_OpTypeId getChildTypeID() const =0
virtual bool evalVariableValue(UT_String &val, int index, int thread)
static const char * theChildTableName
Definition: VOPNET_Node.h:35
virtual VOP_CodeGenerator * getVopCodeGenerator()
Definition: OP_Node.h:2648
Definition: VOPNET_Error.h:11
UT_String myObsoleteParmOrder
Definition: VOPNET_Node.h:131
virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input)=0
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual void deleteCookedData()=0