Panda3D
|
00001 // Filename: rocketFileInterface.h 00002 // Created by: rdb (03Nov11) 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 ROCKET_FILE_INTERFACE_H 00016 #define ROCKET_FILE_INTERFACE_H 00017 00018 #include "config_rocket.h" 00019 00020 #include <Rocket/Core/FileInterface.h> 00021 00022 class VirtualFileSystem; 00023 00024 class RocketFileInterface : public Rocket::Core::FileInterface { 00025 public: 00026 RocketFileInterface(VirtualFileSystem *vfs = NULL); 00027 virtual ~RocketFileInterface() {}; 00028 00029 Rocket::Core::FileHandle Open(const Rocket::Core::String& path); 00030 void Close(Rocket::Core::FileHandle file); 00031 00032 size_t Read(void* buffer, size_t size, Rocket::Core::FileHandle file); 00033 bool Seek(Rocket::Core::FileHandle file, long offset, int origin); 00034 size_t Tell(Rocket::Core::FileHandle file); 00035 00036 protected: 00037 VirtualFileSystem* _vfs; 00038 }; 00039 00040 #endif