HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_Defines.h>
17 #include <UT/UT_ValArray.h>
18 
19 class PRM_Parm;
20 class PRM_EventHandler;
21 
22 typedef void (*PRM_ValueCallback)(void *callee, void *value);
23 
25 {
26 public:
27  PRM_Value();
28  PRM_Value(const PRM_Value &src);
29  ~PRM_Value();
30 
31  void addInterest(void *callee,
32  PRM_ValueCallback callback);
33  void removeInterest(void *callee,
34  PRM_ValueCallback callback);
35  bool hasInterest(void *callee) const;
36 
37 
38  void changed();
39 
40  void setValue(void *value) { myValue = value; }
42  { myValue = value; return *this; }
43 
44  void *getValue() { return myValue; }
45  const void *getValue() const { return myValue; }
46  operator void*() { return myValue; }
47  operator const void*() const { return myValue; }
48 
49  int64 getMemoryUsage(bool inclusive) const;
50 
51 private:
52  void *myValue;
54 };
55 
56 #endif
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
long long int64
Definition: SYS_Types.h:100
void setValue(void *value)
Definition: PRM_Value.h:40
void(* PRM_ValueCallback)(void *callee, void *value)
Definition: PRM_Value.h:22
PRM_Value & operator=(void *value)
Definition: PRM_Value.h:41
GLsizei const GLfloat * value
Definition: glcorearb.h:823
const void * getValue() const
Definition: PRM_Value.h:45
void * getValue()
Definition: PRM_Value.h:44
#define PRM_API
Definition: PRM_API.h:10
GLenum src
Definition: glcorearb.h:1792