00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __SIM_CacheOptions_h__
00015 #define __SIM_CacheOptions_h__
00016
00017 #include "SIM_API.h"
00018 #include <UT/UT_String.h>
00019
00020
00021 class SIM_API SIM_CacheOptions
00022 {
00023 public:
00024
00025 SIM_CacheOptions();
00026
00027 ~SIM_CacheOptions();
00028
00029
00030 const UT_String &getInitialState() const;
00031
00032 void setInitialState(const char *filename);
00033
00034 bool getIsCacheEnabled() const;
00035
00036 void setIsCacheEnabled(bool enabled);
00037
00038 bool getAllowSaveToDisk() const;
00039
00040 void setAllowSaveToDisk(bool allow);
00041
00042 bool getAllowSaveSubsteps() const;
00043
00044 void setAllowSaveSubsteps(bool allow);
00045
00046 int64 getMaxCacheMemSize() const;
00047
00048 void setMaxCacheMemSize(int64 maxsize);
00049
00050
00051
00052 void setCompressSims(bool docompress) { myCompressSims = docompress; }
00053 bool getCompressSims() const { return myCompressSims; }
00054
00055
00056
00057
00058 void setExplicitCache(bool useexplicit, const char *explicitfname, int history);
00059 bool getUseExplicit() const
00060 {
00061 return myUseExplicit && myExplicitName.isstring();
00062 }
00063 const UT_String &getExplicitFname() const { return myExplicitName; }
00064 int getExplicitHistory() const { return myExplicitHistory; }
00065
00066
00067 const SIM_CacheOptions &operator=(const SIM_CacheOptions &src);
00068
00069 private:
00070 UT_String myInitialState;
00071 int64 myMaxCacheMemSize;
00072 bool myIsCacheEnabled;
00073 bool myAllowSaveToDisk;
00074 bool myAllowSaveSubsteps;
00075 bool myUseExplicit;
00076 UT_String myExplicitName;
00077 int myExplicitHistory;
00078 bool myCompressSims;
00079 };
00080
00081 #endif
00082