Panda3D

pandaIOSystem.h

00001 // Filename: pandaIOSystem.h
00002 // Created by:  rdb (29Mar11)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PANDAIOSYSTEM_H
00016 #define PANDAIOSYSTEM_H
00017 
00018 #include "config_assimp.h"
00019 #include "virtualFileSystem.h"
00020 
00021 #include "IOSystem.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : PandaIOSystem
00025 // Description : Custom implementation of Assimp::IOSystem.
00026 ////////////////////////////////////////////////////////////////////
00027 class PandaIOSystem : public Assimp::IOSystem {
00028 public:
00029   PandaIOSystem(VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr());
00030   virtual ~PandaIOSystem() {};
00031 
00032   void Close(Assimp::IOStream *file);
00033   bool ComparePaths(const char *p1, const char *p2) const;
00034   bool Exists(const char *file) const;
00035   char getOsSeparator() const;
00036   Assimp::IOStream *Open(const char *file, const char *mode);
00037 
00038 private:
00039   VirtualFileSystem *_vfs;
00040 };
00041 
00042 #endif
00043 
 All Classes Functions Variables Enumerations