BamCacheRecord

from panda3d.core import BamCacheRecord
class BamCacheRecord

Bases: TypedWritableReferenceCount

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.

Inheritance diagram

Inheritance diagram of BamCacheRecord

__init__(*args, **kwargs)
addDependentFile()

C++ Interface: add_dependent_file(const BamCacheRecord self, const VirtualFile file)

/**
  • Adds the indicated file to the list of files that will be loaded to

  • generate the data in this record. This should be called once for the

  • primary source file, and again for each secondary source file, if any.

*/

/**
  • Variant of add_dependent_file that takes an already opened VirtualFile.

*/

add_dependent_file()

C++ Interface: add_dependent_file(const BamCacheRecord self, const VirtualFile file)

/**
  • Adds the indicated file to the list of files that will be loaded to

  • generate the data in this record. This should be called once for the

  • primary source file, and again for each secondary source file, if any.

*/

/**
  • Variant of add_dependent_file that takes an already opened VirtualFile.

*/

cache_filename
clearData()

C++ Interface: clear_data(const BamCacheRecord self)

/**
  • Removes the in-memory data object associated with this record, if any.

  • This does not affect the on-disk representation of the record.

*/

clearDependentFiles()

C++ Interface: clear_dependent_files(const BamCacheRecord self)

/**
  • Empties the list of files that contribute to the data in this record.

*/

clear_data()

C++ Interface: clear_data(const BamCacheRecord self)

/**
  • Removes the in-memory data object associated with this record, if any.

  • This does not affect the on-disk representation of the record.

*/

clear_dependent_files()

C++ Interface: clear_dependent_files(const BamCacheRecord self)

/**
  • Empties the list of files that contribute to the data in this record.

*/

data
dependentsUnchanged()

C++ Interface: dependents_unchanged(BamCacheRecord self)

/**
  • Returns true if all of the dependent files are still the same as when the

  • cache was recorded, false otherwise.

*/

dependents_unchanged()

C++ Interface: dependents_unchanged(BamCacheRecord self)

/**
  • Returns true if all of the dependent files are still the same as when the

  • cache was recorded, false otherwise.

*/

getCacheFilename()

C++ Interface: get_cache_filename(BamCacheRecord self)

/**
  • Returns the name of the cache file as hashed from the source_pathname.

  • This will be relative to the root of the cache directory, and it will not

  • include any suffixes that may be appended to resolve hash conflicts.

*/

getClassType()

C++ Interface: get_class_type()

getData()

C++ Interface: get_data(BamCacheRecord self)

/**
  • Returns a pointer to the data stored in the record, or NULL if there is no

  • data. The pointer is not removed from the record.

*/

getDependentPathname()

C++ Interface: get_dependent_pathname(BamCacheRecord self, int n)

/**
  • Returns the full pathname of the nth source files that contributes to the

  • cache.

*/

getNumDependentFiles()

C++ Interface: get_num_dependent_files(BamCacheRecord self)

/**
  • Returns the number of source files that contribute to the cache.

*/

getRecordedTime()

C++ Interface: get_recorded_time(BamCacheRecord self)

/**
  • Returns the time at which this particular record was recorded or updated.

*/

getSourcePathname()

C++ Interface: get_source_pathname(BamCacheRecord self)

/**
  • Returns the full pathname to the source file that originally generated this

  • cache request. In some cases, for instance in the case of a of a multipage

  • texture like “cube_#.png”, this may not not a true filename on disk.

*/

getSourceTimestamp()

C++ Interface: get_source_timestamp(BamCacheRecord self)

/**
  • Returns the file timestamp of the original source file that generated this

  • cache record, if available. In some cases the original file timestamp is

  • not available, and this will return 0.

*/

get_cache_filename()

C++ Interface: get_cache_filename(BamCacheRecord self)

/**
  • Returns the name of the cache file as hashed from the source_pathname.

  • This will be relative to the root of the cache directory, and it will not

  • include any suffixes that may be appended to resolve hash conflicts.

*/

get_class_type()

C++ Interface: get_class_type()

get_data()

C++ Interface: get_data(BamCacheRecord self)

/**
  • Returns a pointer to the data stored in the record, or NULL if there is no

  • data. The pointer is not removed from the record.

*/

get_dependent_pathname()

C++ Interface: get_dependent_pathname(BamCacheRecord self, int n)

/**
  • Returns the full pathname of the nth source files that contributes to the

  • cache.

*/

get_num_dependent_files()

C++ Interface: get_num_dependent_files(BamCacheRecord self)

/**
  • Returns the number of source files that contribute to the cache.

*/

get_recorded_time()

C++ Interface: get_recorded_time(BamCacheRecord self)

/**
  • Returns the time at which this particular record was recorded or updated.

*/

get_source_pathname()

C++ Interface: get_source_pathname(BamCacheRecord self)

/**
  • Returns the full pathname to the source file that originally generated this

  • cache request. In some cases, for instance in the case of a of a multipage

  • texture like “cube_#.png”, this may not not a true filename on disk.

*/

get_source_timestamp()

C++ Interface: get_source_timestamp(BamCacheRecord self)

/**
  • Returns the file timestamp of the original source file that generated this

  • cache record, if available. In some cases the original file timestamp is

  • not available, and this will return 0.

*/

hasData()

C++ Interface: has_data(BamCacheRecord self)

/**
  • Returns true if this cache record has an in-memory data object associated–

  • that is, the object stored in the cache.

*/

has_data()

C++ Interface: has_data(BamCacheRecord self)

/**
  • Returns true if this cache record has an in-memory data object associated–

  • that is, the object stored in the cache.

*/

makeCopy()

C++ Interface: make_copy(BamCacheRecord self)

/**
  • Returns a duplicate of the BamCacheRecord. The duplicate will not have a

  • data pointer set, even though one may have been assigned to the original

  • via set_data().

*/

make_copy()

C++ Interface: make_copy(BamCacheRecord self)

/**
  • Returns a duplicate of the BamCacheRecord. The duplicate will not have a

  • data pointer set, even though one may have been assigned to the original

  • via set_data().

*/

output()

C++ Interface: output(BamCacheRecord self, ostream out)

/**

*/

recorded_time
setData()

C++ Interface: set_data(const BamCacheRecord self, TypedWritableReferenceCount ptr) set_data(const BamCacheRecord self, TypedWritable ptr) set_data(const BamCacheRecord self, TypedWritable ptr, ReferenceCount ref_ptr) set_data(const BamCacheRecord self, TypedWritable ptr, int dummy)

/**
  • Stores a new data object on the record. You should pass the same pointer

  • twice, to both parameters; this allows the C++ typecasting to automatically

  • convert the pointer into both a TypedWritable and a ReferenceCount pointer,

  • so that the BamCacheRecord object can reliably manage the reference counts.

  • You may pass 0 or NULL as the second parameter. If you do this, the

  • BamCacheRecord will not manage the object’s reference count; it will be up

  • to you to ensure the object is not deleted during the lifetime of the

  • BamCacheRecord object.

*/

/**
  • This variant on set_data() is provided to easily pass objects deriving from

  • TypedWritable.

*/

/**
  • This variant on set_data() is provided to easily pass objects deriving from

  • TypedWritableReferenceCount.

*/

/**
  • This variant on set_data() is provided just to allow Python code to pass a

  • 0 as the second parameter.

*/

set_data()

C++ Interface: set_data(const BamCacheRecord self, TypedWritableReferenceCount ptr) set_data(const BamCacheRecord self, TypedWritable ptr) set_data(const BamCacheRecord self, TypedWritable ptr, ReferenceCount ref_ptr) set_data(const BamCacheRecord self, TypedWritable ptr, int dummy)

/**
  • Stores a new data object on the record. You should pass the same pointer

  • twice, to both parameters; this allows the C++ typecasting to automatically

  • convert the pointer into both a TypedWritable and a ReferenceCount pointer,

  • so that the BamCacheRecord object can reliably manage the reference counts.

  • You may pass 0 or NULL as the second parameter. If you do this, the

  • BamCacheRecord will not manage the object’s reference count; it will be up

  • to you to ensure the object is not deleted during the lifetime of the

  • BamCacheRecord object.

*/

/**
  • This variant on set_data() is provided to easily pass objects deriving from

  • TypedWritable.

*/

/**
  • This variant on set_data() is provided to easily pass objects deriving from

  • TypedWritableReferenceCount.

*/

/**
  • This variant on set_data() is provided just to allow Python code to pass a

  • 0 as the second parameter.

*/

source_pathname
source_timestamp
upcastToTypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const BamCacheRecord self)

upcast from BamCacheRecord to TypedWritableReferenceCount

upcast_to_TypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const BamCacheRecord self)

upcast from BamCacheRecord to TypedWritableReferenceCount

write()

C++ Interface: write(BamCacheRecord self, ostream out, int indent_level)

/**

*/