HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_ParameterBase.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_ParameterBase__
11 #define __VOP_ParameterBase__
12 
13 #include "VOP_API.h"
14 #include "VOP_ParmGenerator.h"
15 #include <UT/UT_StringHolder.h>
16 
18 {
19 public:
20 
21 
22 protected:
23  VOP_ParameterBase(OP_Network *parent, const char *name,
24  OP_Operator *entry);
25  ~VOP_ParameterBase() override;
26 
27  /// Inherited from VOP_Node.
28  /// Generate the node errors.
29  /// Return true if an error was generated and false otherwise.
30  bool generateErrorsSubclass() override;
31 
32  // Handles the case of having our parameter name changed. This
33  // implementation changes disable when strings in other parameter
34  // nodes.
36  const UT_StringRef &oldparmname,
37  const UT_StringRef &newparmname) override;
38 
40  UT_String &str);
41 
42  // Return true if our parm name conflicts with a global variable or
43  // reserved word or reserved operator parameter.
44  bool hasNameConflicts();
45 
46  void addSharedPragmas(std::ostream &os);
47  void addSharedParamBlockItems(std::ostream &buf);
48 
49  static void changeConditionalFields(
50  OP_Node *node,
51  const UT_StringRef &oldparmname,
52  const UT_StringRef &newparmname);
53 
54 private:
55  // Return value same as hasNameConflicts()
56  bool findAndAddNameConflictErrors();
57 
58  // Store any errors generated by our conditional strings.
59  UT_StringHolder myConditionalErrs[NB_PRM_CONDTYPES];
60 
61 };
62 
63 #endif // __VOP_ParameterBase__
void addSharedPragmas(std::ostream &os)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
~VOP_ParameterBase() override
static void changeConditionalFields(OP_Node *node, const UT_StringRef &oldparmname, const UT_StringRef &newparmname)
void handleParmNameChange(const UT_StringRef &oldparmname, const UT_StringRef &newparmname) override
VOP_ParameterBase(OP_Network *parent, const char *name, OP_Operator *entry)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
void addSharedParamBlockItems(std::ostream &buf)
GLuint const GLchar * name
Definition: glcorearb.h:786
void CONDITIONALSTR(PRM_ConditionalType type, UT_String &str)
PRM_ConditionalType
bool generateErrorsSubclass() override