HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_SubnetConnector.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_SubnetConnector_h__
11 #define __VOP_SubnetConnector_h__
12 
13 #include "VOP_API.h"
14 #include "VOP_ParameterBase.h"
15 
17 
19 {
20 public:
21  static OP_Node *myConstructor(OP_Network *net,
22  const char *name,
23  OP_Operator *entry);
24  static PRM_Template *buildTemplates(VOP_Language *language);
25 
27  const char *parmname,
28  const VOP_TypeInfo &type_info,
29  UT_String &str,
30  bool expand_string,
31  const VOP_Language *language = nullptr
32  ) override;
33 
35  UT_String &in, int idx) const override;
37  const UT_String &in) const override;
38  const char *inputLabel(unsigned idx) const override;
40  const VOP_CodeGenContext &ctx,
41  bool check_shader_context
42  ) const override;
43 
44  void setPARMNAME(const UT_String &str) override;
45  void setPARMLABEL(const UT_String &str);
46  void setPARMTYPEINDEX(int type) override;
47  void setPARMTYPENAME(const UT_StringRef &n)override;
48  void setPARMSTORAGE(int type) override;
49  void setPARMSTRINGTYPE(const char *style);
50 
51  void PARMSCOPE(UT_String &str) const override;
52  void PARMNAME(UT_String &str) const override;
53  void PARMLABEL(UT_String &str) const override;
54  int PARMTYPEINDEX() const override;
55  void PARMTYPENAME(UT_String &str) const override;
56 
57  bool isParmVisible() const override;
58  void copySettingsFrom(
59  VOP_ParmGenerator *pvop) override;
60 
61 protected:
62  VOP_SubnetConnector(OP_Network *parent, const char *name,
63  OP_Operator *entry);
64  ~VOP_SubnetConnector() override;
65 
66  bool updateParmsFlags() override;
67 
68  // Override cook method just so we can set our warnings properly.
69  bool USEASPARMDEFINER() const override;
70  int UNIFORM() const override;
71  int EXPORTPARM() const override;
72 
73  bool needsInput() override;
74 
75  // Determines based on the parm index if the PARMNAME may be changed
76  // when this parm is changed.
78  int pidx) const override;
79 
81  VOP_TypeInfo &type_info,
82  int idx) override;
84  unsigned idx,
85  VOP_VopTypeArray &voptypes) override;
86 
87 private:
88  // Store the index of the Bind Name and Parameter Type parameters.
89  static int theParmNameParmIndex;
90  static int theParmTypeParmIndex;
91 };
92 
93 #endif
Reprsents a language for which VOPs can generate source code.
Definition: VOP_Language.h:27
virtual bool needsInput()=0
virtual bool isParmVisible() const =0
virtual int UNIFORM() const =0
virtual void PARMNAME(UT_String &str) const =0
virtual void copySettingsFrom(VOP_ParmGenerator *pvop)
Copy settings from a source parameter generator.
virtual void getAllowedInputTypesSubclass(unsigned idx, VOP_VopTypeArray &voptypes)
virtual bool getParmConstantString(const char *parmname, const VOP_TypeInfo &type_info, UT_String &str, bool expand_string, const VOP_Language *l=0)
Get the constant code that encodes the value of the node parameter.
virtual void PARMSCOPE(UT_String &str) const
bool updateParmsFlags() override
virtual const char * inputLabel(unsigned idx) const
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
GLuint in
Definition: glew.h:11552
virtual void PARMLABEL(UT_String &str) const =0
virtual void setPARMTYPEINDEX(int type)
#define VOP_API
Definition: VOP_API.h:10
virtual int PARMTYPEINDEX() const =0
bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &ctx, bool check_shader_context) const override
void getInputNameSubclass(UT_String &in, int idx) const override
GLdouble n
Definition: glcorearb.h:2008
virtual bool USEASPARMDEFINER() const =0
virtual void setPARMSTORAGE(int type)
virtual void setPARMTYPENAME(const UT_StringRef &type_name)
int getInputFromNameSubclass(const UT_String &in) const override
virtual void PARMTYPENAME(UT_String &type_name) const
type
Definition: core.h:1059
virtual void setPARMNAME(const UT_String &str)
virtual bool getParmCanAffectParmName(int pidx) const =0
virtual int EXPORTPARM() const