Crazy Eddies GUI System 0.7.5
CEGUIFactoryModule.h
00001 /***********************************************************************
00002         filename:       CEGUIFactoryModule.h
00003         created:        12/4/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines interface for object that controls a loadable
00007                                 module (.dll/.so/ whatever) that contains concrete
00008                                 window / widget implementations and their factories.
00009 *************************************************************************/
00010 /***************************************************************************
00011  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00012  *
00013  *   Permission is hereby granted, free of charge, to any person obtaining
00014  *   a copy of this software and associated documentation files (the
00015  *   "Software"), to deal in the Software without restriction, including
00016  *   without limitation the rights to use, copy, modify, merge, publish,
00017  *   distribute, sublicense, and/or sell copies of the Software, and to
00018  *   permit persons to whom the Software is furnished to do so, subject to
00019  *   the following conditions:
00020  *
00021  *   The above copyright notice and this permission notice shall be
00022  *   included in all copies or substantial portions of the Software.
00023  *
00024  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00025  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00026  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00027  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00028  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00029  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00030  *   OTHER DEALINGS IN THE SOFTWARE.
00031  ***************************************************************************/
00032 #ifndef _CEGUIFactoryModule_h_
00033 #define _CEGUIFactoryModule_h_
00034 
00035 #include "CEGUIDynamicModule.h"
00036 
00037 // Start of CEGUI namespace section
00038 namespace CEGUI
00039 {
00040 
00045 class FactoryModule
00046 {
00047 public:
00058         FactoryModule(const String& filename);
00059 
00060 
00068         virtual ~FactoryModule(void);
00069 
00070 
00081         void    registerFactory(const String& type) const;
00082 
00083 
00091     uint registerAllFactories() const;
00092 
00093 private:
00094         /*************************************************************************
00095                 Implementation Data
00096         *************************************************************************/
00097         static const char       RegisterFactoryFunctionName[];
00098     static const char   RegisterAllFunctionName[];
00099 
00100         typedef void (*FactoryRegisterFunction)(const String&); 
00101     typedef uint (*RegisterAllFunction)(void);
00102 
00103         FactoryRegisterFunction d_regFunc;      
00104     RegisterAllFunction d_regAllFunc;   
00105     DynamicModule* d_module;
00106 };
00107 
00108 } // End of  CEGUI namespace section
00109 
00110 
00111 #endif  // end of guard _CEGUIFactoryModule_h_