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

IFileManager.h

Go to the documentation of this file.
00001 // $Id: IFileManager.h,v 1.3 2000/12/06 00:50:38 burnett Exp $
00002 //
00004 
00005 #if !defined(XMLIFILEMANAGER_H_)
00006 #define XMLIFILEMANAGER_H_
00007 
00008 #if _MSC_VER >= 1000
00009 #pragma once
00010 #endif // _MSC_VER >= 1000
00011 
00012 
00013 #include <vector>
00014 
00015 namespace xml {
00016   class Element; 
00017   class IFile;
00018 
00021   class IFileManager     {
00022   public:
00023     typedef     void    (* LoadParamFunc)(IFile&);
00024     
00026     void load( IFile* file );
00027     
00029     void load( char *filename );
00030     
00033     static IFileManager*        instance() { return (s_instance == 0) ? 
00034                                            new IFileManager() : s_instance; }
00035     static void                         destroy()  { delete s_instance; s_instance = 0; }
00036       
00038     static bool loadParams( LoadParamFunc func = 0);
00039       
00040     // destructor
00041     virtual ~IFileManager();
00042     
00043     void printOn(std::ostream& out);
00044 
00046     const IFile* ifile()const{return m_file;}
00047     
00048   protected:
00049     // constructor
00050     IFileManager();      
00051     
00052   private:
00053     static      std::vector<LoadParamFunc>      s_calls;
00054     static      IFileManager*   s_instance;
00055     IFile*      m_file;
00056   };
00057 } // end namespace xml
00058 #endif // !defined(IFILEMANAGER_H_)

Generated at Wed Nov 21 12:22:26 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000