Crazy Eddies GUI System  0.7.1
CEGUIFactoryModule.h
1 /***********************************************************************
2  filename: CEGUIFactoryModule.h
3  created: 12/4/2004
4  author: Paul D Turner
5 
6  purpose: Defines interface for object that controls a loadable
7  module (.dll/.so/ whatever) that contains concrete
8  window / widget implementations and their factories.
9 *************************************************************************/
10 /***************************************************************************
11  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining
14  * a copy of this software and associated documentation files (the
15  * "Software"), to deal in the Software without restriction, including
16  * without limitation the rights to use, copy, modify, merge, publish,
17  * distribute, sublicense, and/or sell copies of the Software, and to
18  * permit persons to whom the Software is furnished to do so, subject to
19  * the following conditions:
20  *
21  * The above copyright notice and this permission notice shall be
22  * included in all copies or substantial portions of the Software.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
28  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30  * OTHER DEALINGS IN THE SOFTWARE.
31  ***************************************************************************/
32 #ifndef _CEGUIFactoryModule_h_
33 #define _CEGUIFactoryModule_h_
34 
35 #include "CEGUIDynamicModule.h"
36 
37 // Start of CEGUI namespace section
38 namespace CEGUI
39 {
40 
46 {
47 public:
58  FactoryModule(const String& filename);
59 
60 
68  virtual ~FactoryModule(void);
69 
70 
81  void registerFactory(const String& type) const;
82 
83 
91  uint registerAllFactories() const;
92 
93 private:
94  /*************************************************************************
95  Implementation Data
96  *************************************************************************/
97  static const char RegisterFactoryFunctionName[];
98  static const char RegisterAllFunctionName[];
99 
100  typedef void (*FactoryRegisterFunction)(const String&);
101  typedef uint (*RegisterAllFunction)(void);
102 
103  FactoryRegisterFunction d_regFunc;
104  RegisterAllFunction d_regAllFunc;
105  DynamicModule* d_module;
106 };
107 
108 } // End of CEGUI namespace section
109 
110 
111 #endif // end of guard _CEGUIFactoryModule_h_