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  void getCode(UT_String &codestr,
25  const VOP_CodeGenContext &context
26  ) override;
27 
28  const char *inputLabel(unsigned idx) const override;
29  const char *outputLabel(unsigned idx) const override;
30 
31  unsigned getNumVisibleInputs() const override;
32  unsigned getNumVisibleOutputs() const override;
33  unsigned orderedInputs() const override;
34 
36  const VOP_CodeGenContext &context,
37  bool check_shader_context
38  ) const override;
39 
40 
41  void moveInput(int srcidx, int dstidx,
42  bool forcesubnet = false) override;
43 
44  OP_ERROR setInput(unsigned idx, OP_Node *op,
45  unsigned outputidx = 0) override;
47  unsigned idx,
48  const char *label,
49  int keeppos,
50  unsigned outputidx = 0) override;
51 
53  const OP_ConnectorId& input_name,
54  OP_Node *op,
55  const OP_ConnectorId* output_name = nullptr
56  ) override;
58  const OP_ConnectorId& input_name,
59  const char *label,
60  int,
61  const OP_ConnectorId* output_name = nullptr
62  ) override;
63 
64 
67  int output_index,
68  UT_IntArray & input_indices) override;
69 
70 protected:
71  VOP_Null(OP_Network *parent, const char *name, OP_Operator *entry);
72  ~VOP_Null() override;
73 
74  void postOpChanged(
75  OP_EventType reason, void *data) override;
76 
78  UT_String &in, int idx) const override;
80  const UT_String &in) const override;
82  VOP_TypeInfo &type_info,
83  int idx) override;
84 
86  UT_String &out, int idx) const override;
88  VOP_TypeInfo &type_info,
89  int idx) override;
91  int out_idx,
92  VOP_Type shader_type) override;
94  int out_idx,
95  VOP_Type shader_type) override;
96 
97  void adjustOutputParmsForInputChange(int idx,
98  bool inputnull);
99  void adjustOutputParmsForNamedInputChange(
100  const OP_ConnectorId& input_name,
101  bool inputnull);
102  void swapInputs(int srcidx, int dstidx);
103 
105  UT_String &out, int idx) const override;
106 
107  virtual int NUMPARMS() const;
108  virtual void OUTPUTNAME(UT_String &str, int idx, bool expand) const;
109  virtual CH_StringMeaning OUTPUTNAMEmeaning(int idx) const;
110  virtual void setOutputParm(UT_String &str, CH_StringMeaning meaning,
111  int idx);
112  virtual void OUTPUTLABEL(UT_String &str, int idx) const;
113 
114 private:
115 
116  bool mySearchingForInputs;
117 };
118 
119 #endif
virtual int getInputFromNameSubclass(const UT_String &in) const
void moveInput(int srcidx, int dstidx, bool forcesubnet=false) override
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
OP_ERROR setNamedInputReference(const OP_ConnectorId &input_name, const char *label, int, const OP_ConnectorId *output_name=nullptr) override
CH_StringMeaning
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const
virtual unsigned getNumVisibleInputs() const
virtual const char * inputLabel(unsigned idx) const
OP_ERROR setInput(unsigned idx, OP_Node *op, unsigned outputIdx=0) override
UT_ErrorSeverity
Definition: UT_Error.h:25
virtual unsigned getNumVisibleOutputs() const
OP_ERROR setInputReference(unsigned idx, const char *label, int keeppos, unsigned outputIdx=0) override
Connects an input to particular node by name in the network.
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void findSimpleInputCandidatesFromOutput(int output_index, UT_IntArray &input_indices)
Definition: VOP_Node.h:1269
#define VOP_API
Definition: VOP_API.h:10
virtual UT_IntArray getShaderLayerExportsInputsToCopy(int out_idx, VOP_Type shader_type)
virtual unsigned orderedInputs() const
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual VOP_Node * findSimpleInputFromOutput(int output_index)
Definition: VOP_Node.h:1264
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:786
virtual void getTentativeOutputName(UT_String &out, int idx) const
OP_EventType
Definition: OP_Value.h:22
VOP_Type
Enumeration of the built-in (basic) VOP data types.
Definition: VOP_Types.h:25
virtual void getInputNameSubclass(UT_String &in, int idx) const
Definition: format.h:895
OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=nullptr) override
New input functions that use names instead of indices.
virtual UT_StringHolder getShaderLayerExportsToAdd(int out_idx, VOP_Type shader_type)
virtual void postOpChanged(OP_EventType, void *)
Definition: VOP_Node.h:1455