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

panda/src/express/virtualFileMountMultifile.h

Go to the documentation of this file.
00001 // Filename: virtualFileMountMultifile.h
00002 // Created by:  drose (03Aug02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef VIRTUALFILEMOUNTMULTIFILE_H
00020 #define VIRTUALFILEMOUNTMULTIFILE_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "virtualFileMount.h"
00025 #include "multifile.h"
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : VirtualFileMountMultifile
00029 // Description : Maps a Multifile's contents into the
00030 //               VirtualFileSystem.
00031 ////////////////////////////////////////////////////////////////////
00032 class EXPCL_PANDAEXPRESS VirtualFileMountMultifile : public VirtualFileMount {
00033 public:
00034   INLINE VirtualFileMountMultifile(VirtualFileSystem *file_system,
00035                                    Multifile *multifile, 
00036                                    const Filename &mount_point,
00037                                    int mount_flags);
00038   virtual ~VirtualFileMountMultifile();
00039 
00040   INLINE Multifile *get_multifile() const;
00041 
00042   virtual bool has_file(const Filename &file) const;
00043   virtual bool is_directory(const Filename &file) const;
00044   virtual bool is_regular_file(const Filename &file) const;
00045 
00046   virtual istream *open_read_file(const Filename &file) const;
00047   virtual bool scan_directory(vector_string &contents, 
00048                               const Filename &dir) const;
00049 
00050 
00051 private:
00052   Multifile *_multifile;
00053 
00054 
00055 public:
00056   virtual TypeHandle get_type() const {
00057     return get_class_type();
00058   }
00059   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00060   static TypeHandle get_class_type() {
00061     return _type_handle;
00062   }
00063   static void init_type() {
00064     VirtualFileMount::init_type();
00065     register_type(_type_handle, "VirtualFileMountMultifile",
00066                   VirtualFileMount::get_class_type());
00067   }
00068 
00069 private:
00070   static TypeHandle _type_handle;
00071 };
00072 
00073 #include "virtualFileMountMultifile.I"
00074 
00075 #endif

Generated on Fri May 2 00:38:49 2003 for Panda by doxygen1.3