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  virtual ~VOP_ParameterBase();
25 
26  /// Inherited from VOP_Node.
27  /// Generate the node errors.
28  /// Return true if an error was generated and false otherwise.
29  virtual bool generateErrorsSubclass();
30 
31  // Handles the case of having our parameter name changed. This
32  // implementation changes disable when strings in other parameter
33  // nodes.
34  virtual void handleParmNameChange(
35  const UT_StringRef &oldparmname,
36  const UT_StringRef &newparmname);
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)
static void changeConditionalFields(OP_Node *node, const UT_StringRef &oldparmname, const UT_StringRef &newparmname)
virtual bool generateErrorsSubclass()
virtual ~VOP_ParameterBase()
VOP_ParameterBase(OP_Network *parent, const char *name, OP_Operator *entry)
virtual void handleParmNameChange(const UT_StringRef &oldparmname, const UT_StringRef &newparmname)
void addSharedParamBlockItems(std::ostream &buf)
GLuint const GLchar * name
Definition: glcorearb.h:785
void CONDITIONALSTR(PRM_ConditionalType type, UT_String &str)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
PRM_ConditionalType
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107