15 #ifndef BAMCACHERECORD_H
16 #define BAMCACHERECORD_H
18 #include "pandabase.h"
19 #include "typedWritableReferenceCount.h"
20 #include "pointerTo.h"
21 #include "linkedListNode.h"
53 INLINE
const Filename &get_source_pathname()
const;
54 INLINE
const Filename &get_cache_filename()
const;
55 INLINE time_t get_source_timestamp()
const;
56 INLINE time_t get_recorded_time()
const;
58 INLINE
int get_num_dependent_files()
const;
59 INLINE
const Filename &get_dependent_pathname(
int n)
const;
61 bool dependents_unchanged()
const;
62 void clear_dependent_files();
63 void add_dependent_file(
const Filename &pathname);
65 INLINE
bool has_data()
const;
66 INLINE
void clear_data();
72 void output(ostream &out)
const;
73 void write(ostream &out,
int indent_level = 0)
const;
77 class SortByAccessTime {
82 static string format_timestamp(time_t timestamp);
86 time_t _recorded_time;
87 streamsize _record_size;
88 time_t _source_timestamp;
109 time_t _record_access_time;
112 static void register_with_read_factory();
123 static void init_type() {
124 TypedWritableReferenceCount::init_type();
125 register_type(_type_handle,
"BamCacheRecord",
126 TypedWritableReferenceCount::get_class_type());
129 return get_class_type();
131 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
138 friend class BamCacheRecord::SortByAccessTime;
141 INLINE ostream &operator << (ostream &out,
const BamCacheRecord &record) {
146 #include "bamCacheRecord.I"
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This class maintains a cache of Bam and/or Txo objects generated from model files and texture images ...
Base class for objects that can be written to and read from Bam files.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This just stores the pointers to implement a doubly-linked list of some kind of object.
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...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
A base class for all things that want to be reference-counted.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...