00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __ROP_IPRList__
00020 #define __ROP_IPRList__
00021
00022 #include "ROP_API.h"
00023 #include <SYS/SYS_Types.h>
00024
00025 class UT_IStream;
00026 class rop_IPREntry;
00027 class IFD_IPRTree;
00028
00029 class ROP_API ROP_IPRList {
00030 public:
00031 ROP_IPRList();
00032 ~ROP_IPRList();
00033
00034 bool clearCache();
00035
00036 void setRenderer(const char *name, const char *prefix)
00037 {
00038 myRenderer = name;
00039 myPrefix = prefix;
00040 }
00041
00042 IFD_IPRTree *findTree(fpreal now);
00043 IFD_IPRTree *getTree(fpreal now, int maxtrees=1);
00044 IFD_IPRTree *getTree(const char *filename, fpreal now,
00045 int maxtrees=1);
00046 void trimEntries(int maxtrees);
00047 int entries() const { return myEntries; }
00048
00049 void setDestroyCache(bool onoff);
00050 void afterLoad(float now);
00051
00052 int save(ostream &os);
00053 bool load(UT_IStream &is);
00054
00055 private:
00056 static void exitCallback(void *);
00057 void addToClearList();
00058 void removeFromClearList();
00059
00060 rop_IPREntry *myList;
00061 int myEntries;
00062 ROP_IPRList *myClearPrev, *myClearNext;
00063 const char *myRenderer, *myPrefix;
00064 bool myDestroyCache;
00065 };
00066
00067 #endif
00068