Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

VirtualFileMountMultifile Class Reference

Maps a Multifile's contents into the VirtualFileSystem. More...

#include <virtualFileMountMultifile.h>

Inheritance diagram for VirtualFileMountMultifile:

VirtualFileMount TypedObject List of all members.

Public Member Functions

 VirtualFileMountMultifile (VirtualFileSystem *file_system, Multifile *multifile, const Filename &mount_point, int mount_flags)
virtual ~VirtualFileMountMultifile ()
Multifileget_multifile () const
 Returns the Multifile pointer that this mount object is based on.

virtual bool has_file (const Filename &file) const
 Returns true if the indicated file exists within the mount system.

virtual bool is_directory (const Filename &file) const
 Returns true if the indicated file exists within the mount system and is a directory.

virtual bool is_regular_file (const Filename &file) const
 Returns true if the indicated file exists within the mount system and is a regular file.

virtual istream * open_read_file (const Filename &file) const
 Opens the file for reading, if it exists.

virtual bool scan_directory (vector_string &contents, const Filename &dir) const
 Fills the given vector up with the list of filenames that are local to this directory, if the filename is a directory.

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
VirtualFileSystemget_file_system () const
 Returns the file system this mount object is attached to.

const Filenameget_physical_filename () const
 Returns the name of the source file on the OS filesystem of the directory or file that is mounted.

const Filenameget_mount_point () const
 Returns the name of the directory within the virtual file system that this mount object is attached to.

int get_mount_flags () const
 Returns the set of flags passed by the user to the VirtualFileSystem::mount() command.

virtual void output (ostream &out) const
virtual void write (ostream &out) const
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.

bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.


Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.


Protected Attributes

VirtualFileSystem_file_system
Filename _physical_filename
Filename _mount_point
int _mount_flags

Private Attributes

Multifile_multifile

Static Private Attributes

TypeHandle _type_handle

Detailed Description

Maps a Multifile's contents into the VirtualFileSystem.

Definition at line 39 of file virtualFileMountMultifile.h.


Constructor & Destructor Documentation

VirtualFileMountMultifile::VirtualFileMountMultifile VirtualFileSystem file_system,
Multifile multifile,
const Filename mount_point,
int  mount_flags
[inline]
 

Definition at line 32 of file virtualFileMountMultifile.I.

VirtualFileMountMultifile::~VirtualFileMountMultifile  )  [virtual]
 

Definition at line 37 of file virtualFileMountMultifile.cxx.


Member Function Documentation

virtual TypeHandle VirtualFileMountMultifile::force_init_type void   )  [inline, virtual]
 

Reimplemented from VirtualFileMount.

Definition at line 66 of file virtualFileMountMultifile.h.

TypeHandle VirtualFileMountMultifile::get_class_type void   )  [inline, static]
 

Reimplemented from VirtualFileMount.

Definition at line 67 of file virtualFileMountMultifile.h.

VirtualFileSystem * VirtualFileMount::get_file_system  )  const [inline, inherited]
 

Returns the file system this mount object is attached to.

Definition at line 54 of file virtualFileMount.I.

References VirtualFileMount::_physical_filename, and INLINE.

int VirtualFileMount::get_mount_flags  )  const [inline, inherited]
 

Returns the set of flags passed by the user to the VirtualFileSystem::mount() command.

Definition at line 102 of file virtualFileMount.I.

const Filename & VirtualFileMount::get_mount_point  )  const [inline, inherited]
 

Returns the name of the directory within the virtual file system that this mount object is attached to.

This directory name will end with a slash.

Definition at line 87 of file virtualFileMount.I.

Referenced by VirtualFileSimple::get_file_system(), and VirtualFileMount::output().

Multifile * VirtualFileMountMultifile::get_multifile  )  const [inline]
 

Returns the Multifile pointer that this mount object is based on.

Definition at line 53 of file virtualFileMountMultifile.I.

const Filename & VirtualFileMount::get_physical_filename  )  const [inline, inherited]
 

Returns the name of the source file on the OS filesystem of the directory or file that is mounted.

Definition at line 70 of file virtualFileMount.I.

Referenced by VirtualFileMount::output(), and VirtualFileMount::~VirtualFileMount().

virtual TypeHandle VirtualFileMountMultifile::get_type void   )  const [inline, virtual]
 

Reimplemented from VirtualFileMount.

Definition at line 63 of file virtualFileMountMultifile.h.

References VirtualFileMount::init_type(), and register_type().

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

bool VirtualFileMountMultifile::has_file const Filename file  )  const [virtual]
 

Returns true if the indicated file exists within the mount system.

Implements VirtualFileMount.

Definition at line 57 of file virtualFileMountMultifile.cxx.

References _multifile, Filename::empty(), and Multifile::has_directory().

void VirtualFileMountMultifile::init_type void   )  [inline, static]
 

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from VirtualFileMount.

Definition at line 70 of file virtualFileMountMultifile.h.

bool VirtualFileMountMultifile::is_directory const Filename file  )  const [virtual]
 

Returns true if the indicated file exists within the mount system and is a directory.

Implements VirtualFileMount.

Definition at line 74 of file virtualFileMountMultifile.cxx.

References _multifile, Multifile::find_subfile(), and NULL.

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is the indicated type exactly.

Definition at line 101 of file typedObject.I.

Referenced by PT(), and CollisionNode::xform().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

bool VirtualFileMountMultifile::is_regular_file const Filename file  )  const [virtual]
 

Returns true if the indicated file exists within the mount system and is a regular file.

Implements VirtualFileMount.

Definition at line 89 of file virtualFileMountMultifile.cxx.

References _multifile.

istream * VirtualFileMountMultifile::open_read_file const Filename file  )  const [virtual]
 

Opens the file for reading, if it exists.

Returns a newly allocated istream on success (which you should eventually delete when you are done reading). Returns NULL on failure.

Implements VirtualFileMount.

Definition at line 108 of file virtualFileMountMultifile.cxx.

void VirtualFileMount::output ostream &  out  )  const [virtual, inherited]
 

Definition at line 48 of file virtualFileMount.cxx.

References VirtualFileMount::get_mount_point(), and VirtualFileMount::get_physical_filename().

bool VirtualFileMountMultifile::scan_directory vector_string &  contents,
const Filename dir
const [virtual]
 

Fills the given vector up with the list of filenames that are local to this directory, if the filename is a directory.

Returns true if successful, or false if the file is not a directory or cannot be read.

Implements VirtualFileMount.

Definition at line 131 of file virtualFileMountMultifile.cxx.

void VirtualFileMount::write ostream &  out  )  const [virtual, inherited]
 

Definition at line 61 of file virtualFileMount.cxx.


Member Data Documentation

VirtualFileSystem* VirtualFileMount::_file_system [protected, inherited]
 

Definition at line 70 of file virtualFileMount.h.

int VirtualFileMount::_mount_flags [protected, inherited]
 

Definition at line 73 of file virtualFileMount.h.

Filename VirtualFileMount::_mount_point [protected, inherited]
 

Definition at line 72 of file virtualFileMount.h.

Multifile* VirtualFileMountMultifile::_multifile [private]
 

Definition at line 59 of file virtualFileMountMultifile.h.

Referenced by has_file(), is_directory(), and is_regular_file().

Filename VirtualFileMount::_physical_filename [protected, inherited]
 

Definition at line 71 of file virtualFileMount.h.

Referenced by VirtualFileMount::get_file_system(), VirtualFileMountSystem::has_file(), VirtualFileMountSystem::is_directory(), and VirtualFileMountSystem::open_read_file().

TypeHandle VirtualFileMountMultifile::_type_handle [static, private]
 

Reimplemented from VirtualFileMount.

Definition at line 25 of file virtualFileMountMultifile.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:56:07 2003 for Panda by doxygen1.3