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 
17 {
18 public:
19 
20 
21 protected:
22  VOP_ParameterBase(OP_Network *parent, const char *name,
23  OP_Operator *entry);
24  ~VOP_ParameterBase() override;
25 
26  /// Inherited from VOP_Node.
27  /// Generate the node errors.
28  /// Return true if an error was generated and false otherwise.
29  bool generateErrorsSubclass() override;
30 
31  // Handles the case of having our parameter name changed. This
32  // implementation changes disable when strings in other parameter
33  // nodes.
35  const UT_StringRef &oldparmname,
36  const UT_StringRef &newparmname) override;
37 
39  UT_String &str);
40 
41  // Return true if our parm name conflicts with a global variable or
42  // reserved word or reserved operator parameter.
43  bool hasNameConflicts();
44 
45  void addSharedPragmas(std::ostream &os);
46  void addSharedParamBlockItems(std::ostream &buf);
47 
48  static void changeConditionalFields(
49  OP_Node *node,
50  const UT_StringRef &oldparmname,
51  const UT_StringRef &newparmname);
52 
53 private:
54  // Return value same as hasNameConflicts()
55  bool findAndAddNameConflictErrors();
56 
57  // Store any errors generated by our conditional strings.
58  UT_DeepString myConditionalErrs[NB_PRM_CONDTYPES];
59 
60 };
61 
62 #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)
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
type
Definition: core.h:1059