00001 00005 /* Copyright, 2000-2002 Nevrax Ltd. 00006 * 00007 * This file is part of NEVRAX NEL. 00008 * NEVRAX NEL is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2, or (at your option) 00011 * any later version. 00012 00013 * NEVRAX NEL is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * General Public License for more details. 00017 00018 * You should have received a copy of the GNU General Public License 00019 * along with NEVRAX NEL; see the file COPYING. If not, write to the 00020 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00021 * MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef NL_FORM_LOADER_H 00025 #define NL_FORM_LOADER_H 00026 00027 #include "nel/misc/types_nl.h" 00028 #include "nel/misc/smart_ptr.h" 00029 #include "nel/georges/u_form_loader.h" 00030 00031 00032 namespace NLGEORGES 00033 { 00034 00035 class UForm; 00036 class CType; 00037 class CFormDfn; 00038 class CForm; 00039 00047 class CFormLoader : public UFormLoader 00048 { 00049 public: 00050 virtual ~CFormLoader(); 00051 // From UFormLoader 00052 UForm *loadForm (const char *filename); 00053 UFormDfn *loadFormDfn (const char *filename); 00054 UType *loadFormType (const char *filename); 00055 00056 // Load type and formDfn 00057 CType *loadType (const char *filename); 00058 CFormDfn *loadFormDfn (const char *filename, bool forceLoad); 00059 00060 private: 00061 00062 // Error handling 00063 virtual void warning (bool exception, const char *function, const char *format, ... ) const; 00064 00065 typedef std::map<std::string, NLMISC::CRefPtr<CType> > TTypeMap; 00066 typedef std::map<std::string, NLMISC::CRefPtr<CFormDfn> > TFormDfnMap; 00067 typedef std::map<std::string, NLMISC::CRefPtr<CForm> > TFormMap; 00068 00069 // Map of filename / CRefPtr<CType> 00070 TTypeMap _MapType; 00071 00072 // Map of filename / CRefPtr<CFormDfnCFormDfn> 00073 TFormDfnMap _MapFormDfn; 00074 00075 // Map of form / CRefPtr<CForm> 00076 TFormMap _MapForm; 00077 }; 00078 00079 00080 } // NLGEORGES 00081 00082 00083 #endif // NL_FORM_LOADER_H 00084 00085 /* End of form_loader.h */
1.6.1