HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_ParmCache.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_ParmCache.h ( OP Library, C++)
7  *
8  * COMMENTS:
9  * This class handles tracking what the last value of the
10  * parm was & whether it has changed.
11  */
12 
13 #ifndef __OP_ParmCache__
14 #define __OP_ParmCache__
15 
16 #include "OP_API.h"
17 #include <UT/UT_ValArray.h>
18 #include <SYS/SYS_Types.h>
19 
20 class OP_Context;
21 class OP_Parameters;
22 class op_ParmCacheEntry;
23 
25 {
26 public:
27  explicit OP_ParmCache(OP_Parameters *node);
28  ~OP_ParmCache();
29 
30  // This checks if the specified index is dirty. If it is not known,
31  // it is added to our cached values table (but no value is cached yet)
32  bool isDirty(int idx, fpreal t);
33 
34  // This caches all the values that we've built references to.
35  void updateValues(const OP_Context &context);
36 
37  int64 getMemoryUsage(bool inclusive) const;
38 
39 private:
40  OP_Parameters *myNode; // Not _quite_ a node...
41  UT_ValArray<op_ParmCacheEntry *> myCachedValues;
42 };
43 
44 #endif
45 
long long int64
Definition: SYS_Types.h:116
GLdouble t
Definition: glad.h:2397
fpreal64 fpreal
Definition: SYS_Types.h:277
#define OP_API
Definition: OP_API.h:10