HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
POP_Cache.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  */
7 
8 #ifndef __POP_Cache_h__
9 #define __POP_Cache_h__
10 
11 #include "POP_API.h"
12 #include <UT/UT_ValArray.h>
13 #include <UT/UT_FloatArray.h>
14 
15 class POP_ContextData;
16 
18 {
19 public:
20  POP_Cache();
21  ~POP_Cache();
22 
23  void setCacheEnable(int on);
24  void setCacheUnlimited(int on);
25  void setMaxSize(int size, POP_ContextData *context = 0);
26 
27  POP_ContextData *cache(POP_ContextData *, float t);
28 
29  POP_ContextData *getContext(float t);
30 
31  void clear();
32  void clearPastGivenTime(float t);
33  void getCacheSettings(int &enabled, int &unlimited, int &cachesize);
34  int getMaxSize() { return myMaxCacheSize; }
35 
36  float getStartTime();
37  float getEndTime();
38 
39  void print();
40 
41 
42 private:
43 
44  int getIndex(int &index, float t);
45  int getIndex(int &index, POP_ContextData *context);
46  void truncate(int keepStart, int keepEnd);
47 
49  UT_FloatArray myCookTimes;
50  int myCacheEnabled;
51  int myCacheUnlimited;
52  int myMaxCacheSize;
53 };
54 
55 
56 
57 #endif
#define POP_API
Definition: POP_API.h:10
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2538
GLsizeiptr size
Definition: glcorearb.h:663
int getMaxSize()
Definition: POP_Cache.h:34
GLuint index
Definition: glcorearb.h:785