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  ~OP_TakeParm() override;
37 
38  TAKE_Data *duplicate() const override;
39 
40  bool canDuplicateForNode(int op_id) const override;
41  TAKE_Data *duplicateForNode(int op_id) const override;
42 
43  int save(std::ostream &os, int binary) const override;
44  bool load(UT_IStream &is) override;
45 
46  void storeCurrent() override;
47  void applyData() override;
48  void markActive() override;
49  void markInactive() override;
51  void generateCommand(UT_WorkBuffer &buf) override;
52  void getDescription(UT_WorkBuffer &buf, int brief) override;
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  int64 getMemoryUsage() const override;
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 
void getDescription(UT_WorkBuffer &buf, int brief) override=0
TAKE_Data * duplicate() const override=0
virtual bool canDuplicateForNode(int op_id) const =0
GLenum src
Definition: glew.h:2410
virtual void markInactive()=0
virtual int64 getMemoryUsage() const =0
virtual bool load(UT_IStream &is)=0
void storeCurrent() override=0
OP_TakeParm(const TAKE_DataId &id, const OP_TakeParm &src)
Definition: OP_TakeParm.h:30
const GLuint GLenum const void * binary
Definition: glew.h:3502
virtual void generateIncludeCommand(UT_WorkBuffer &)=0
long long int64
Definition: SYS_Types.h:116
void generateCommand(UT_WorkBuffer &buf) override=0
virtual int save(std::ostream &os, int binary) const =0
#define OP_API
Definition: OP_API.h:10
void applyData() override
virtual TAKE_Data * duplicateForNode(int op_id) const =0
OP_TakeParm(const OP_TakeParm &src)
Definition: OP_TakeParm.h:24
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
virtual void markActive()=0