An instance of this class is written to the front of a Bam or Txo file to make the file a cached instance of some other loadable resource.
More...
Classes |
| class | DependentFile |
| class | SortByAccessTime |
Public Member Functions |
| void | add_dependent_file (const Filename &pathname) |
| | Adds the indicated file to the list of files that will be loaded to generate the data in this record.
|
| void | clear_data () |
| | Removes the in-memory data object associated with this record, if any.
|
| void | clear_dependent_files () |
| | Empties the list of files that contribute to the data in this record.
|
| bool | dependents_unchanged () const |
| | Returns true if all of the dependent files are still the same as when the cache was recorded, false otherwise.
|
| bool | extract_data (TypedWritable *&ptr, ReferenceCount *&ref_ptr) |
| | Fills ptr and ref_ptr with the two different-typed pointers to the same object, the data stored within this record.
|
|
virtual TypeHandle | force_init_type () |
| const Filename & | get_cache_filename () const |
| | Returns the name of the cache file as hashed from the source_pathname.
|
| TypedWritable * | get_data () const |
| | Returns a pointer to the data stored in the record, or NULL if there is no data.
|
| const Filename & | get_dependent_pathname (int n) const |
| | Returns the full pathname of the nth source files that contributes to the cache.
|
| int | get_num_dependent_files () const |
| | Returns the number of source files that contribute to the cache.
|
| time_t | get_recorded_time () const |
| | Returns the time at which this particular record was recorded or updated.
|
| const Filename & | get_source_pathname () const |
| | Returns the full pathname to the source file that originally generated this cache request.
|
|
virtual TypeHandle | get_type () const |
| bool | has_data () const |
| | Returns true if this cache record has an in-memory data object associated--that is, the object stored in the cache.
|
| bool | operator== (const BamCacheRecord &other) const |
| | Returns true if the record matches the other record in those attributes which get written to disk.
|
|
void | output (ostream &out) const |
|
| PT (BamCacheRecord) make_copy() const |
| void | set_data (TypedWritable *ptr, int dummy) |
| | This variant on set_data() is provided just to allow Python code to pass a 0 as the second parameter.
|
| void | set_data (TypedWritable *ptr, ReferenceCount *ref_ptr) |
| | Stores a new data object on the record.
|
|
void | write (ostream &out, int indent_level=0) const |
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type BamCacheRecord.
|
Protected Member Functions |
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new BamCacheRecord.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type BamCacheRecord is encountered in the Bam file.
|
Friends |
|
class | BamCache |
|
class | BamCacheIndex |
|
class | BamCacheRecord::SortByAccessTime |
An instance of this class is written to the front of a Bam or Txo file to make the file a cached instance of some other loadable resource.
This record contains information needed to test the validity of the cache.
Definition at line 38 of file bamCacheRecord.h.
Fills ptr and ref_ptr with the two different-typed pointers to the same object, the data stored within this record.
This transfers ownership of the data pointer; the caller will be responsible for managing the reference counts on this object subsequently.
Returns true if the record contained any data (and the pointers have been filled), false if it didn't (and the pointers are NULL).
Definition at line 161 of file bamCacheRecord.I.
References clear_data().