D:/Zythum/DinoKod/Common/Directory.h

00001 #ifndef __DIRECTORY_H__
00002 #define __DIRECTORY_H__
00003 
00004 #include "Common/CommonDll.h"
00005 #include "Common/Types.h"
00006 #include "Common/List.h"
00007 #include "Common/Str.h"
00008 #include "Common/Ini.h"
00009 
00010 //---------------------------------------------------------------------------------------------------------------------
00011 class COMMON_API KDirectoryFile
00012 {
00013 public:
00014         KIni*                   m_pIni;
00015         KStr                    m_sFileName;
00016 
00017         KDirectoryFile()
00018         {
00019                 m_pIni = NULL;
00020         }
00021 
00022         KDirectoryFile( KStr& sFileName )
00023         {
00024                 m_sFileName = sFileName;
00025                 m_pIni = new KIni( m_sFileName );
00026         }
00027 
00028         ~KDirectoryFile()
00029         {
00030                 if( m_pIni )
00031                         Deletep( m_pIni );
00032         }
00033 
00034 };
00035 
00036 
00037 //---------------------------------------------------------------------------------------------------------------------
00038 class COMMON_API KDirectory
00039 {
00040 private:
00041         KList<KDirectoryFile*>          m_IniList;
00042 
00043 protected:
00044         KStr                                            m_sCurrentDirectory;
00045 
00046 public:
00047         KDirectory();
00048         ~KDirectory();
00049 
00050         s32                             GetnPath()      { return  m_IniList.GetSize();  }
00051 //      const char*             GetPath( char* pDirectory, s32 nPath = 0 );
00052         KStr                    GetPath( KStr& sDirectory, s32 nPath = 0 );
00053         bool                    AddFile( KStr& sFileName );
00054         bool                    RemoveFile( KStr& sFileName );
00055         KStr&                   GetCurrent()    { return m_sCurrentDirectory;   }
00056 };
00057 
00058 extern COMMON_API KDirectory    g_Directory;
00059 
00060 #endif  __DIRECTORY_H__

Generated on Sun Mar 25 20:02:10 2007 for Zythum Project by  doxygen 1.5.1-p1