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_NonCopyable.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();
29 
30  PRM_Value(const PRM_Value &src) { *this = src; }
32 
33  void addInterest(void *callee,
34  PRM_ValueCallback callback);
35  void removeInterest(void *callee,
36  PRM_ValueCallback callback);
37  bool hasInterest(void *callee) const;
38 
39 
40  void changed();
41 
42  void setValue(void *value) { myValue = value; }
44  { myValue = value; return *this; }
45 
46  void *getValue() { return myValue; }
47  const void *getValue() const { return myValue; }
48  operator void*() { return myValue; }
49  operator const void*() const { return myValue; }
50 
51  int64 getMemoryUsage(bool inclusive) const;
52 
53 private:
54  void *myValue;
56 };
57 
58 #endif
void
Definition: png.h:1083
GLsizei const GLfloat * value
Definition: glcorearb.h:824
PRM_Value(const PRM_Value &src)
Definition: PRM_Value.h:30
long long int64
Definition: SYS_Types.h:116
void setValue(void *value)
Definition: PRM_Value.h:42
void(* PRM_ValueCallback)(void *callee, void *value)
Definition: PRM_Value.h:22
PRM_Value & operator=(void *value)
Definition: PRM_Value.h:43
LeafData & operator=(const LeafData &)=delete
const void * getValue() const
Definition: PRM_Value.h:47
void * getValue()
Definition: PRM_Value.h:46
#define PRM_API
Definition: PRM_API.h:10
GLenum src
Definition: glcorearb.h:1793