Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

filemanager.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                  filemanager.h  -  File and package management
00003                              -------------------
00004     begin                : Fri Nov 2 2001
00005     copyright            : (C) 2001 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, filemanager.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2001
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NEFILEMANAGER_H
00028 #define __NEFILEMANAGER_H
00029 
00030 
00037 #include "base.h"
00038 
00039 #include <string>
00040 
00041 
00042 namespace NeoEngine
00043 {
00044 
00045 
00046 //external classes
00047 class Package;
00048 class Directory;
00049 class File;
00050 class FileCodec;
00051 
00052 
00053 
00058 class NEOENGINE_API FileManager
00059 {
00060     protected:
00061 
00063         static int                                     s_iFileManagers;
00064 
00065 
00066     protected:
00067 
00069         std::string                                    m_strName;
00070 
00072         Directory                                     *m_pkRoot;
00073 
00075         bool                                           m_bChanged;
00076 
00077 
00078     public:
00079 
00083                                                        FileManager( const std::string &rstrName );
00084 
00088         virtual                                       ~FileManager();
00089 
00096         static bool                                    LoadCodec( int iFileFlag, const std::string &rstrName );
00097 
00103         static FileCodec                              *FindCodec( int iFileFlag );
00104 
00110         bool                                           AddPackage( const std::string &rstrPackage );
00111 
00117         File                                          *GetByName( const std::string &rstrName );
00118 
00122         Directory                                     *GetRoot() { return m_pkRoot; }
00123 
00127         void                                           Clear();
00128 
00133         bool                                           HasChanged();
00134 
00139         void                                           PrintHierarchy( int iDepth = 0 );
00140 };
00141 
00142 
00143 };
00144 
00145 
00146 #endif

Generated on Wed Jan 21 14:21:06 2004 for NeoEngine by doxygen 1.3.5