18 #include "pandabase.h" 19 #include "bamCacheRecord.h" 20 #include "pointerTo.h" 25 #include "reMutexHolder.h" 52 INLINE
void set_active(
bool flag);
53 INLINE
bool get_active()
const;
55 INLINE
void set_cache_models(
bool flag);
56 INLINE
bool get_cache_models()
const;
58 INLINE
void set_cache_textures(
bool flag);
59 INLINE
bool get_cache_textures()
const;
61 INLINE
void set_cache_compressed_textures(
bool flag);
62 INLINE
bool get_cache_compressed_textures()
const;
67 INLINE
void set_flush_time(
int flush_time);
68 INLINE
int get_flush_time()
const;
70 INLINE
void set_cache_max_kbytes(
int max_kbytes);
71 INLINE
int get_cache_max_kbytes()
const;
73 INLINE
void set_read_only(
bool ro);
74 INLINE
bool get_read_only()
const;
77 const string &cache_extension);
80 void consider_flush_index();
83 void list_index(ostream &out,
int indent_level = 0)
const;
85 INLINE
static BamCache *get_global_ptr();
86 INLINE
static void consider_flush_global_index();
87 INLINE
static void flush_global_index();
91 bool read_index_pathname(
Filename &index_pathname,
92 string &index_ref_contents)
const;
95 INLINE
void mark_index_stale();
98 void remove_from_index(
const Filename &source_filename);
100 void check_cache_size();
102 void emergency_read_only();
115 static string hash_filename(
const string &filename);
116 static void make_global();
120 bool _cache_textures;
121 bool _cache_compressed_textures;
129 time_t _index_stale_since;
132 string _index_ref_contents;
137 #include "bamCache.I" This class maintains a cache of Bam and/or Txo objects generated from model files and texture images ...
This represents the in-memory index that records the list of files stored in the BamCache.
The name of a file, such as a texture file or an Egg file.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...