14#ifndef BAMCACHERECORD_H
15#define BAMCACHERECORD_H
50 INLINE
const Filename &get_source_pathname()
const;
51 INLINE
const Filename &get_cache_filename()
const;
52 INLINE time_t get_source_timestamp()
const;
53 INLINE time_t get_recorded_time()
const;
55 MAKE_PROPERTY(source_pathname, get_source_pathname);
56 MAKE_PROPERTY(cache_filename, get_cache_filename);
57 MAKE_PROPERTY(source_timestamp, get_source_timestamp);
58 MAKE_PROPERTY(recorded_time, get_recorded_time);
60 INLINE
int get_num_dependent_files()
const;
61 INLINE
const Filename &get_dependent_pathname(
int n)
const;
63 bool dependents_unchanged()
const;
64 void clear_dependent_files();
65 void add_dependent_file(
const Filename &pathname);
68 INLINE
bool has_data()
const;
69 INLINE
void clear_data();
77 MAKE_PROPERTY2(data, has_data, get_data, set_data, clear_data);
79 void output(std::ostream &out)
const;
80 void write(std::ostream &out,
int indent_level = 0)
const;
84 class SortByAccessTime {
89 static std::string format_timestamp(time_t timestamp);
93 time_t _recorded_time;
94 std::streamsize _record_size;
95 time_t _source_timestamp;
101 std::streamsize _size;
105 DependentFiles _files;
116 time_t _record_access_time;
119 static void register_with_read_factory();
130 static void init_type() {
131 TypedWritableReferenceCount::init_type();
133 TypedWritableReferenceCount::get_class_type());
136 return get_class_type();
138 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
145 friend class BamCacheRecord::SortByAccessTime;
148INLINE std::ostream &operator << (std::ostream &out,
const BamCacheRecord &record) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This represents the in-memory index that records the list of files stored in the BamCache.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This class maintains a cache of Bam and/or Txo objects generated from model files and texture images ...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
This just stores the pointers to implement a doubly-linked list of some kind of object.
A base class for all things that want to be reference-counted.
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
Base class for objects that can be written to and read from Bam files.
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.
The abstract base class for a file or directory within the VirtualFileSystem.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.