HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_String &oldparmname,
36  const UT_String &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(OP_Node *node,
49  const UT_String &oldparmname,
50  const UT_String &newparmname);
51 
52 private:
53  // Return value same as hasNameConflicts()
54  bool findAndAddNameConflictErrors();
55 
56  // Store any errors generated by our conditional strings.
57  UT_DeepString myConditionalErrs[NB_PRM_CONDTYPES];
58 
59 };
60 
61 #endif // __VOP_ParameterBase__
void addSharedPragmas(std::ostream &os)
virtual bool generateErrorsSubclass()
virtual ~VOP_ParameterBase()
PRM_ConditionalType
VOP_ParameterBase(OP_Network *parent, const char *name, OP_Operator *entry)
void addSharedParamBlockItems(std::ostream &buf)
virtual void handleParmNameChange(const UT_String &oldparmname, const UT_String &newparmname)
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
static void changeConditionalFields(OP_Node *node, const UT_String &oldparmname, const UT_String &newparmname)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107