29 #ifndef _CEGUIWindowFactoryManager_h_
30 #define _CEGUIWindowFactoryManager_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
34 #include "CEGUI/Singleton.h"
35 #include "CEGUI/Logger.h"
36 #include "CEGUI/IteratorBase.h"
37 #include "CEGUI/WindowFactory.h"
38 #include "CEGUI/TplWindowFactory.h"
39 #include "CEGUI/Exceptions.h"
44 # pragma warning(push)
45 # pragma warning(disable : 4275)
46 # pragma warning(disable : 4251)
107 const String& getActiveTarget(
void)
const;
116 uint getStackedTargetCount(
void)
const;
122 typedef std::vector<
String
123 CEGUI_VECTOR_ALLOC(
String)> TargetTypeStack;
125 TargetTypeStack d_targetStack;
145 Logger::getSingleton().logEvent(
"CEGUI::WindowFactoryManager singleton destroyed");
180 template <
typename T>
181 static void addFactory();
197 template <
typename T>
198 static void addWindowType();
214 void removeFactory(
const String& name);
241 void removeAllFactories(
void);
273 bool isFactoryPresent(
const String& name)
const;
301 void addWindowTypeAlias(
const String& aliasName,
const String& targetType);
321 void removeWindowTypeAlias(
const String& aliasName,
const String& targetType);
327 void removeAllWindowTypeAliases();
360 void addFalagardWindowMapping(
const String& newType,
373 void removeFalagardWindowMapping(
const String& type);
379 void removeAllFalagardWindowMappings();
392 bool isFalagardMappedType(
const String& type)
const;
406 const String& getMappedLookForType(
const String& type)
const;
420 const String& getMappedRendererForType(
const String& type)
const;
440 String getDereferencedAliasType(
const String& type)
const;
454 const FalagardWindowMapping& getFalagardMappingForType(
const String& type)
const;
461 CEGUI_MAP_ALLOC(String, WindowFactory*)> WindowFactoryRegistry;
463 CEGUI_MAP_ALLOC(String, AliasTargetStack)> TypeAliasRegistry;
465 CEGUI_MAP_ALLOC(String, FalagardWindowMapping)> FalagardMapRegistry;
466 typedef std::vector<WindowFactory*
468 CEGUI_VECTOR_ALLOC(WindowFactory*)> OwnedWindowFactoryList;
470 WindowFactoryRegistry d_factoryRegistry;
471 TypeAliasRegistry d_aliasRegistry;
472 FalagardMapRegistry d_falagardRegistry;
473 static OwnedWindowFactoryList d_ownedFactories;
488 WindowFactoryIterator getIterator(
void)
const;
495 TypeAliasIterator getAliasIterator(
void)
const;
502 FalagardMappingIterator getFalagardMappingIterator()
const;
506 template <
typename T>
513 if (WindowFactoryManager::getSingletonPtr())
515 Logger::getSingleton().logEvent(
"Created WindowFactory for '" +
521 WindowFactoryManager::getSingleton().addFactory(factory);
525 Logger::getSingleton().logEvent(
"Deleted WindowFactory for '" +
529 CEGUI_DELETE_AO factory;
534 d_ownedFactories.push_back(factory);
538 template <
typename T>
541 WindowFactoryManager::addFactory<TplWindowFactory<T> >();
549 #if defined(_MSC_VER)
550 # pragma warning(pop)
553 #endif // end of guard _CEGUIWindowFactoryManager_h_
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5579
Definition: MemoryAllocatedObject.h:109
AliasTargetStack(void)
Constructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:90
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
static void addFactory()
Creates a WindowFactory of the type T and adds it to the system for use. The created WindowFactory wi...
Definition: WindowFactoryManager.h:507
static void addWindowType()
Internally creates a factory suitable for creating Window objects of the given type and adds it to th...
Definition: WindowFactoryManager.h:539
Class that manages WindowFactory objects.
Definition: WindowFactoryManager.h:61
~WindowFactoryManager(void)
Destructor for WindowFactoryManager objects.
Definition: WindowFactoryManager.h:143
~AliasTargetStack(void)
Destructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:97
Class used to track active alias targets for Window factory types.
Definition: WindowFactoryManager.h:83
struct used to hold mapping information required to create a falagard based window.
Definition: WindowFactoryManager.h:70
const String & getTypeName() const
Get the string that describes the type of Window object this WindowFactory produces.
Definition: WindowFactory.h:152
Definition: Singleton.h:55
Root exception class used within the GUI system.
Definition: Exceptions.h:46
iterator class for maps
Definition: IteratorBase.h:196
Abstract class that defines the required interface for all WindowFactory objects. ...
Definition: WindowFactory.h:115
String class used within the GUI system.
Definition: String.h:62