HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_Null.h
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  * NAME: VOP Library (C++)
7  *
8  */
9 
10 #ifndef __VOP_Null_h__
11 #define __VOP_Null_h__
12 
13 #include "VOP_API.h"
14 #include "VOP_Node.h"
15 
16 class VOP_API VOP_Null : public VOP_Node
17 {
18 public:
19  static OP_Node *myConstructor(OP_Network *net,
20  const char *name,
21  OP_Operator *entry);
22  static PRM_Template myTemplateList[];
23 
24  virtual void getCode(UT_String &codestr,
25  const VOP_CodeGenContext &context);
26 
27  virtual const char *inputLabel(unsigned idx) const;
28  virtual const char *outputLabel(unsigned idx) const;
29 
30  virtual unsigned getNumVisibleInputs() const;
31  virtual unsigned getNumVisibleOutputs() const;
32  virtual unsigned orderedInputs() const;
33 
34  virtual bool forceCodeGenerationOfInputs(
35  const VOP_CodeGenContext &context,
36  bool check_shader_context) const;
37 
38 
39  virtual void moveInput(int srcidx, int dstidx,
40  bool forcesubnet = false);
41 
42  virtual OP_ERROR setInput(unsigned idx, OP_Node *op,
43  unsigned outputidx = 0);
44  virtual OP_ERROR setInputReference(unsigned idx,
45  const char *label,
46  int keeppos,
47  unsigned outputidx = 0);
48 
49  virtual OP_ERROR setNamedInput(const OP_ConnectorId& input_name, OP_Node *op,
50  const OP_ConnectorId* output_name = NULL);
51  virtual OP_ERROR setNamedInputReference(const OP_ConnectorId& input_name,
52  const char *label, int, const OP_ConnectorId* output_name = NULL);
53 
54 
57  int output_index,
58  UT_IntArray & input_indices );
59 
60 protected:
61  VOP_Null(OP_Network *parent, const char *name, OP_Operator *entry);
62  virtual ~VOP_Null();
63 
64  virtual void postOpChanged(OP_EventType reason, void *data);
65 
66  virtual void getInputNameSubclass(UT_String &in, int idx) const;
67  virtual int getInputFromNameSubclass(const UT_String &in) const;
68  virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info,
69  int idx);
70 
71  virtual void getOutputNameSubclass(UT_String &out, int idx) const;
72  virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info,
73  int idx);
75  VOP_Type shader_type);
76  virtual UT_StringHolder getShaderLayerExportsToAdd(int out_idx,
77  VOP_Type shader_type);
78 
79  void adjustOutputParmsForInputChange(int idx,
80  bool inputnull);
81  void adjustOutputParmsForNamedInputChange(
82  const OP_ConnectorId& input_name,
83  bool inputnull);
84  void swapInputs(int srcidx, int dstidx);
85 
86  virtual void getTentativeOutputName(UT_String &out, int idx) const;
87 
88  virtual int NUMPARMS() const;
89  virtual void OUTPUTNAME(UT_String &str, int idx, bool expand) const;
90  virtual CH_StringMeaning OUTPUTNAMEmeaning(int idx) const;
91  virtual void setOutputParm(UT_String &str, CH_StringMeaning meaning,
92  int idx);
93  virtual void OUTPUTLABEL(UT_String &str, int idx) const;
94 
95 private:
96 
97  bool mySearchingForInputs;
98 };
99 
100 #endif
virtual int getInputFromNameSubclass(const UT_String &in) const
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
virtual OP_ERROR setInput(unsigned idx, OP_Node *op, unsigned outputIdx=0)
CH_StringMeaning
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const
virtual unsigned getNumVisibleInputs() const
virtual void moveInput(int srcidx, int dstidx, bool forcesubnet=false)
virtual const char * inputLabel(unsigned idx) const
UT_ErrorSeverity
Definition: UT_Error.h:25
virtual unsigned getNumVisibleOutputs() const
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void findSimpleInputCandidatesFromOutput(int output_index, UT_IntArray &input_indices)
Definition: VOP_Node.h:1185
#define VOP_API
Definition: VOP_API.h:10
virtual UT_IntArray getShaderLayerExportsInputsToCopy(int out_idx, VOP_Type shader_type)
virtual unsigned orderedInputs() const
virtual OP_ERROR setInputReference(unsigned idx, const char *label, int keeppos, unsigned outputIdx=0)
Connects an input to particular node by name in the network.
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual OP_ERROR setNamedInputReference(const OP_ConnectorId &input_name, const char *label, int, const OP_ConnectorId *output_name=NULL)
virtual VOP_Node * findSimpleInputFromOutput(int output_index)
Definition: VOP_Node.h:1180
virtual OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=NULL)
New input functions that use names instead of indices.
virtual void getCode(UT_String &codestr, const VOP_CodeGenContext &context)
Get the code fragment to be included in the shader code.
virtual const char * outputLabel(unsigned idx) const
virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void getOutputNameSubclass(UT_String &out, int idx) const
GLuint index
Definition: glcorearb.h:785
virtual void getTentativeOutputName(UT_String &out, int idx) const
OP_EventType
Definition: OP_Value.h:22
VOP_Type
Definition: VOP_Types.h:24
virtual void getInputNameSubclass(UT_String &in, int idx) const
virtual UT_StringHolder getShaderLayerExportsToAdd(int out_idx, VOP_Type shader_type)
virtual void postOpChanged(OP_EventType, void *)
Definition: VOP_Node.h:1364