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(const 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  bool isOutputConnector() const;
62 
63 protected:
64  VOP_SubnetConnector(OP_Network *parent, const char *name,
65  OP_Operator *entry);
66  ~VOP_SubnetConnector() override;
67 
68  void preOpChanged(
69  OP_EventType reason, void *data) override;
70  bool updateParmsFlags() override;
71 
72  // Override cook method just so we can set our warnings properly.
73  bool USEASPARMDEFINER() const override;
74  int UNIFORM() const override;
75  int EXPORTPARM() const override;
76 
77  bool needsInput() override;
78 
79  // Determines based on the parm index if the PARMNAME may be changed
80  // when this parm is changed.
82  int pidx) const override;
83 
85  VOP_TypeInfo &type_info,
86  int idx) override;
88  unsigned idx,
89  VOP_VopTypeArray &voptypes) override;
90 
91 private:
92  // Store the index of the Bind Name and Parameter Type parameters.
93  static int theParmNameParmIndex;
94  static int theParmTypeParmIndex;
95 };
96 
97 #endif
Reprsents a language for which VOPs can generate source code.
Definition: VOP_Language.h:29
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
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void PARMLABEL(UT_String &str) const =0
GLdouble n
Definition: glcorearb.h:2008
virtual void setPARMTYPEINDEX(int type)
#define VOP_API
Definition: VOP_API.h:10
virtual int PARMTYPEINDEX() const =0
virtual void preOpChanged(OP_EventType, void *)
Definition: VOP_Node.h:1453
bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &ctx, bool check_shader_context) const override
GLuint const GLchar * name
Definition: glcorearb.h:786
void getInputNameSubclass(UT_String &in, int idx) const override
virtual bool USEASPARMDEFINER() const =0
virtual void setPARMSTORAGE(int type)
virtual void setPARMTYPENAME(const UT_StringRef &type_name)
OP_EventType
Definition: OP_Value.h:22
int getInputFromNameSubclass(const UT_String &in) const override
virtual void PARMTYPENAME(UT_String &type_name) const
virtual void setPARMNAME(const UT_String &str)
type
Definition: core.h:1059
virtual bool getParmCanAffectParmName(int pidx) const =0
Definition: format.h:895
virtual int EXPORTPARM() const