21 INLINE BamReaderAuxData::
47 return _source->get_filename();
49 static const Filename empty_filename;
50 return empty_filename;
61 return _loader_options;
71 _loader_options = options;
83 nassertr(_source != NULL,
true);
84 return _source->is_eof();
133 return _file_stdfloat_double;
171 nassertr(_source != NULL, NULL);
172 return _source->get_file();
184 nassertr(_source != NULL, NULL);
185 return _source->get_vfile();
202 nassertr(_source != NULL, 0);
203 return _source->get_file_pos();
226 INLINE
void BamReader::
237 INLINE
bool BamReader::
239 nassertr(_source != NULL,
false);
240 if (_source->is_error()) {
244 if (!_source->get_datagram(datagram)) {
257 INLINE BamReader::AuxData::
266 INLINE BamReader::CreatedObj::
272 _change_this_ref(NULL)
281 INLINE BamReader::CreatedObj::
301 INLINE
void BamReader::CreatedObj::
304 if (_ref_ptr != NULL) {
305 nassertv(_ref_ptr != ref_ptr);
306 unref_delete(_ref_ptr);
312 if (_ref_ptr != NULL) {
316 nassertv(_ref_ptr == ref_ptr);
334 scan = param->get_iterator();
335 manager = param->get_manager();
Keeps a reference-counted pointer to a file on disk.
A Factory can be used to create an instance of a particular subclass of some general base class...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Specifies parameters that may be passed to the loader.
Base class for objects that can be written to and read from Bam files.
BamEndian get_file_endian() const
Returns the endian preference indicated by the Bam file currently being read.
streampos get_file_pos()
Returns the current file position within the data stream, if any, or 0 if the file position is not me...
The abstract base class for a file or directory within the VirtualFileSystem.
FactoryParam * get_param(int n) const
Returns the nth parameter that has been added to the set.
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being read.
int get_file_major_ver() const
Returns the major version number of the Bam file currently being read.
void set_stdfloat_double(bool stdfloat_double)
Changes the stdfloat_double flag, which defines the operation performed by add_stdfloat() and Datagra...
void set_loader_options(const LoaderOptions &options)
Specifies the LoaderOptions for this BamReader.
bool get_file_stdfloat_double() const
Returns true if the file stores all "standard" floats as 64-bit doubles, or false if they are 32-bit ...
The name of a file, such as a texture file or an Egg file.
const LoaderOptions & get_loader_options() const
Returns the LoaderOptions passed to the loader when the model was requested, if any.
const FileReference * get_file()
Returns the FileReference that provides the source for these datagrams, if any, or NULL if the datagr...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
DatagramGenerator * get_source()
Returns the current source of the BamReader as set by set_source() or the constructor.
void ref() const
Explicitly increments the reference count.
int get_current_minor_ver() const
Returns the minor version number of Bam files supported by the current code base. ...
A base class for all things that want to be reference-counted.
VirtualFile * get_vfile()
Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagram...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
A class to retrieve the individual data elements previously stored in a Datagram. ...
The parameters that are passed through the Factory to any object constructing itself from a Bam file...
This class defines the abstract interace to any source of datagrams, whether it be from a file or fro...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
const Filename & get_filename() const
If a BAM is a file, then the BamReader should contain the name of the file.
bool is_eof() const
Returns true if the reader has reached end-of-file, false otherwise.
int get_current_major_ver() const
Returns the major version number of Bam files supported by the current code base. ...