HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DOP_OperatorInfo.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: DOP_OperatorInfo.h ( DOP Library, C++)
7  *
8  * COMMENTS: This is additional information available via every DOP
9  * operator.
10  */
11 
12 #ifndef __DOP_OperatorInfo__
13 #define __DOP_OperatorInfo__
14 
15 #include "DOP_API.h"
16 #include <OP/OP_Operator.h>
17 #include <UT/UT_String.h>
18 #include <UT/UT_StringHolder.h>
19 
21 {
22 public:
24  virtual ~DOP_OperatorInfo();
25 
26  /// Returns the number of outputs for operators of this type.
27  int getNumOutputs() const;
28  /// Sets the number of outputs for operators of this type.
29  void setNumOutputs(int outputs);
30 
31  /// Returns the name of the data that should be created by this node.
32  /// This function is used by DOP_Auto nodes, which create a SIM_Data
33  /// of a particular type.
34  const UT_String &getDataName() const;
35  /// Sets the name of the data that should be created by this node.
36  /// This function is used by DOP_Auto nodes, which create a SIM_Data
37  /// of a particular type.
38  void setDataName(const char *dataname);
39 
40  /// Returns the type of data that should be created by this node.
41  /// This function is used by DOP_Auto nodes, which create a SIM_Data
42  /// of a particular type.
44  { return myDataTypeName; }
45  /// Sets the type of data that should be created by this node.
46  /// This function is used by DOP_Auto nodes, which create a SIM_Data
47  /// of a particular type.
48  void setDataTypeName(const UT_StringHolder &datatype)
49  { myDataTypeName = datatype; }
50 
51  /// Returns the type of data that represents the "lowest common
52  /// demoninator" of data types that we are compatible with.
53  const UT_String &getLCDDataTypeName() const;
54  /// Sets the type of data that represents the "lowest common
55  /// demoninator" of data types that we are compatible with.
56  void setLCDDataTypeName(const char *lcddatatype);
57 
58  /// Returns what type of data should be added if the node is
59  /// bypassed. Non-string means it should be removed in this case.
60  const UT_String &getBypassDataTypeName() const { return myBypassDataTypeName; }
61  void setBypassDataTypeName(const char *name) { myBypassDataTypeName.harden(name); }
62 
63  bool getPureApplyData() const { return myPureApplyData; }
64  void setPureApplyData(bool pureapply) { myPureApplyData = pureapply; }
65 
66  bool getInitialTemplateFlag() const { return myInitialTemplateFlag; }
67  void setInitialTemplateFlag(bool val) { myInitialTemplateFlag = val; }
68 
69  virtual void saveToDialogScript(std::ostream &os) const;
70 
71 private:
72  UT_String myDataName;
73  UT_StringHolder myDataTypeName;
74  UT_String myBypassDataTypeName;
75  UT_String myLCDDataTypeName;
76  int myNumOutputs;
77  bool myPureApplyData;
78  bool myInitialTemplateFlag;
79 };
80 
81 #endif
82 
void setDataTypeName(const UT_StringHolder &datatype)
const UT_StringHolder & getDataTypeName() const
const UT_String & getBypassDataTypeName() const
bool getInitialTemplateFlag() const
#define DOP_API
Definition: DOP_API.h:10
void setPureApplyData(bool pureapply)
void setBypassDataTypeName(const char *name)
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual void saveToDialogScript(std::ostream &os) const =0
bool getPureApplyData() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setInitialTemplateFlag(bool val)