HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_Defines.h>
18 #include <UT/UT_ValArray.h>
19 #include <SYS/SYS_Types.h>
20 
21 class OP_Context;
22 class OP_Parameters;
23 class op_ParmCacheEntry;
24 
26 {
27 public:
28  explicit OP_ParmCache(OP_Parameters *node);
29  ~OP_ParmCache();
30 
31  // This checks if the specified index is dirty. If it is not known,
32  // it is added to our cached values table (but no value is cached yet)
33  bool isDirty(int idx, fpreal t);
34 
35  // This caches all the values that we've built references to.
36  void updateValues(const OP_Context &context);
37 
38  int64 getMemoryUsage(bool inclusive) const;
39 
40 private:
41  OP_Parameters *myNode; // Not _quite_ a node...
42  UT_ValArray<op_ParmCacheEntry *> myCachedValues;
43 };
44 
45 #endif
46 
long long int64
Definition: SYS_Types.h:100
double fpreal
Definition: SYS_Types.h:263
#define OP_API
Definition: OP_API.h:10