HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_Value.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: PRM_Value.h
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __PRM_Value_h__
13 #define __PRM_Value_h__
14 
15 #include "PRM_API.h"
16 #include <UT/UT_ValArray.h>
17 
18 class PRM_Parm;
19 class PRM_EventHandler;
20 
21 typedef void (*PRM_ValueCallback)(void *callee, void *value);
22 
24 {
25 public:
26  PRM_Value();
27  PRM_Value(const PRM_Value &src);
28  ~PRM_Value();
29 
30  void addInterest(void *callee,
31  PRM_ValueCallback callback);
32  void removeInterest(void *callee,
33  PRM_ValueCallback callback);
34  bool hasInterest(void *callee) const;
35 
36 
37  void changed();
38 
39  void setValue(void *value) { myValue = value; }
41  { myValue = value; return *this; }
42 
43  void *getValue() { return myValue; }
44  const void *getValue() const { return myValue; }
45  operator void*() { return myValue; }
46  operator const void*() const { return myValue; }
47 
48  int64 getMemoryUsage(bool inclusive) const;
49 
50 private:
51  void *myValue;
53 };
54 
55 #endif
void
Definition: png.h:1083
GLsizei const GLfloat * value
Definition: glcorearb.h:824
long long int64
Definition: SYS_Types.h:116
void setValue(void *value)
Definition: PRM_Value.h:39
void(* PRM_ValueCallback)(void *callee, void *value)
Definition: PRM_Value.h:21
PRM_Value & operator=(void *value)
Definition: PRM_Value.h:40
const void * getValue() const
Definition: PRM_Value.h:44
void * getValue()
Definition: PRM_Value.h:43
Definition: core.h:1131
#define PRM_API
Definition: PRM_API.h:10
GLenum src
Definition: glcorearb.h:1793