28 INLINE
bool BamCacheRecord::
30 return (_source_pathname == other._source_pathname &&
31 _cache_filename == other._cache_filename &&
32 _recorded_time == other._recorded_time &&
33 _record_size == other._record_size);
41 INLINE
const Filename &BamCacheRecord::
42 get_source_pathname()
const {
43 return _source_pathname;
51 INLINE
const Filename &BamCacheRecord::
52 get_cache_filename()
const {
53 return _cache_filename;
61 INLINE time_t BamCacheRecord::
62 get_source_timestamp()
const {
63 return _source_timestamp;
69 INLINE time_t BamCacheRecord::
70 get_recorded_time()
const {
71 return _recorded_time;
77 INLINE
int BamCacheRecord::
78 get_num_dependent_files()
const {
86 INLINE
const Filename &BamCacheRecord::
87 get_dependent_pathname(
int n)
const {
88 nassertr(n >= 0 && n < (
int)_files.size(), _files[0]._pathname);
89 return _files[n]._pathname;
96 INLINE
bool BamCacheRecord::
98 return (_ptr !=
nullptr);
105 INLINE
void BamCacheRecord::
107 if (_ref_ptr !=
nullptr) {
138 return (ptr !=
nullptr);
158 if (_ref_ptr !=
nullptr) {
188 nassertv(dummy == 0);
195 INLINE
bool BamCacheRecord::SortByAccessTime::
197 return (a->_record_access_time < b->_record_access_time);
set_data
Stores a new data object on the record.
virtual ReferenceCount * as_reference_count()
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
Base class for objects that can be written to and read from Bam files.
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...
PT(BamCacheRecord) BamCacheRecord
Returns a duplicate of the BamCacheRecord.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
void ref() const
Explicitly increments the reference count.
A base class for all things that want to be reference-counted.
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 withi...
void unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...