HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_TakeParm.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: OP_TakeParm.h ( OP Library, C++)
7  *
8  * COMMENTS: Take information for node parms
9  */
10 
11 #ifndef __OP_TakeParm__
12 #define __OP_TakeParm__
13 
14 #include "OP_API.h"
15 #include "OP_TakeData.h"
16 #include <iosfwd>
17 
18 class PRM_Parm;
19 
21 {
22 public:
23  OP_TakeParm(TAKE_DataId &id, const PRM_Parm *parm);
25  : OP_TakeData(src.getId(), src.getPriority())
26  {
27  myParmData.harden(src.myParmData);
28  myChanData.harden(src.myChanData);
29  }
31  : OP_TakeData(id, src.getPriority())
32  {
33  myParmData.harden(src.myParmData);
34  myChanData.harden(src.myChanData);
35  }
36  virtual ~OP_TakeParm();
37 
38  virtual TAKE_Data *duplicate() const;
39 
40  virtual bool canDuplicateForNode(int op_id) const;
41  virtual TAKE_Data *duplicateForNode(int op_id) const;
42 
43  virtual int save(std::ostream &os, int binary) const;
44  virtual bool load(UT_IStream &is);
45 
46  virtual void storeCurrent();
47  virtual void applyData();
48  virtual void markActive();
49  virtual void markInactive();
51  virtual void generateCommand(UT_WorkBuffer &buf);
52  virtual void getDescription(UT_WorkBuffer &buf, int brief);
53 
54  OP_TakeParm &operator=(const OP_TakeParm &src);
55 private:
56  void saveParmData(OP_Node *node, PRM_Parm *parm, int pidx,
57  UT_String &pdata, UT_String &cdata);
58  void loadParmData(OP_Node *node, int pidx,
59  const char *pdata, const char *cdata,
60  bool send_event);
61  virtual int64 getMemoryUsage() const;
62  PRM_Parm *lookupParm(OP_Node *node=0) const;
63  int lookupParmIndex(OP_Node *) const;
64 
65  UT_String myParmData;
66  UT_String myChanData;
67 };
68 
69 #endif
70 
virtual bool canDuplicateForNode(int op_id) const =0
virtual void markInactive()=0
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
virtual void getDescription(UT_WorkBuffer &buf, int brief)=0
virtual int64 getMemoryUsage() const =0
virtual bool load(UT_IStream &is)=0
virtual void generateCommand(UT_WorkBuffer &buf)=0
long long int64
Definition: SYS_Types.h:107
virtual TAKE_Data * duplicate() const =0
OP_TakeParm(const TAKE_DataId &id, const OP_TakeParm &src)
Definition: OP_TakeParm.h:30
virtual void storeCurrent()=0
virtual void generateIncludeCommand(UT_WorkBuffer &)=0
virtual void applyData()
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
virtual int save(std::ostream &os, int binary) const =0
#define OP_API
Definition: OP_API.h:10
virtual TAKE_Data * duplicateForNode(int op_id) const =0
OP_TakeParm(const OP_TakeParm &src)
Definition: OP_TakeParm.h:24
GLenum src
Definition: glcorearb.h:1792
virtual void markActive()=0