HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_Parm.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_Parm.h ( OP Library, C++)
7  *
8  * COMMENTS:
9  * This class is an abstraction of a PRM_Parm-index pair for an OP's
10  * parameter. This class is mostly useful for UI operations that don't
11  * rely on the speed of a lookup operation. The advantage of this class
12  * is that it does not rely on the persistance of a Parm, nor its node.
13  * In some cases holding on to a PRM_Parm pointer is dangerous because
14  * PRM_Parm pointers can be deleted for a variety of reasons (PRM_Multi,
15  * OTL changes, etc...)
16  */
17 
18 #ifndef __OP_Parm_h__
19 #define __OP_Parm_h__
20 
21 #include "OP_API.h"
22 #include <UT/UT_String.h>
23 
24 class OP_Node;
25 class PRM_Parm;
26 
28 {
29 public:
30  OP_Parm(PRM_Parm &parm, int subindex);
31  ~OP_Parm();
32 
33 
34  // Returns the PRM_Parm corresponding to our OP_Parm. Always check for
35  // a NULL value as it is possible.
36  PRM_Parm *getParm() const;
37 
38  // Use this version of getParm if you would also like to know the subindex
39  PRM_Parm *getParm(int &subindex) const;
40 
41  // Returns the node, could be NULL.
42  OP_Node *getNode() const;
43 
44 
45 protected:
46  int myNodeId;
48 };
49 
50 #endif
51 
int myNodeId
Definition: OP_Parm.h:46
#define OP_API
Definition: OP_API.h:10
UT_String myParmName
Definition: OP_Parm.h:47