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"
45# pragma warning(disable : 4275)
46# pragma warning(disable : 4251)
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();
470 WindowFactoryRegistry d_factoryRegistry;
471 TypeAliasRegistry d_aliasRegistry;
472 FalagardMapRegistry d_falagardRegistry;
474 static OwnedWindowFactoryList d_ownedFactories;
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);
541 WindowFactoryManager::addFactory<TplWindowFactory<T> >();
Definition: MemoryAllocatedObject.h:110
iterator class for maps
Definition: IteratorBase.h:197
Root exception class used within the GUI system.
Definition: Exceptions.h:49
Definition: Singleton.h:56
String class used within the GUI system.
Definition: String.h:64
Class used to track active alias targets for Window factory types.
Definition: WindowFactoryManager.h:84
AliasTargetStack(void)
Constructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:90
~AliasTargetStack(void)
Destructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:97
uint getStackedTargetCount(void) const
Return the number of stacked target types in the stack.
const String & getActiveTarget(void) const
Return a String holding the current target type for this stack.
Class that manages WindowFactory objects.
Definition: WindowFactoryManager.h:64
void addFactory(WindowFactory *factory)
Adds a new WindowFactory to the list of registered factories.
void removeWindowTypeAlias(const String &aliasName, const String &targetType)
Remove the specified alias mapping. If the alias mapping does not exist, nothing happens.
void addWindowTypeAlias(const String &aliasName, const String &targetType)
Adds an alias for a current window type.
WindowFactoryManager(void)
Constructs a new WindowFactoryManager object.
~WindowFactoryManager(void)
Destructor for WindowFactoryManager objects.
Definition: WindowFactoryManager.h:143
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
TypeAliasIterator getAliasIterator(void) const
Return a WindowFactoryManager::TypeAliasIterator object to iterate over the defined aliases for windo...
WindowFactoryIterator getIterator(void) const
Return a WindowFactoryManager::WindowFactoryIterator object to iterate over the available WindowFacto...
const FalagardWindowMapping & getFalagardMappingForType(const String &type) const
Return the FalagardWindowMapping for the specified window mapping type.
void removeFactory(const String &name)
Removes a WindowFactory from the list of registered factories.
bool isFalagardMappedType(const String &type) const
Return whether the given type is a falagard mapped type.
void addFalagardWindowMapping(const String &newType, const String &targetType, const String &lookName, const String &renderer, const String &effectName=String(""))
Add a mapping for a falagard based window.
void removeFalagardWindowMapping(const String &type)
Remove the specified falagard type mapping if it exists.
const String & getMappedRendererForType(const String &type) const
Return the name of the WindowRenderer assigned to the specified window mapping.
void removeAllFactories(void)
Remove all WindowFactory objects from the list.
bool isFactoryPresent(const String &name) const
Checks the list of registered WindowFactory objects, aliases, and falagard mapped types for one which...
FalagardMappingIterator getFalagardMappingIterator() const
Return a WindowFactoryManager::FalagardMappingIterator object to iterate over the defined falagard wi...
const String & getMappedLookForType(const String &type) const
Return the name of the LookN'Feel assigned to the specified window mapping.
WindowFactory * getFactory(const String &type) const
Return a pointer to the specified WindowFactory object.
void removeAllFalagardWindowMappings()
Remove all registered falagard type mappings.
String getDereferencedAliasType(const String &type) const
Use the alias system, where required, to 'de-reference' the specified type to an actual window type t...
void removeFactory(WindowFactory *factory)
Removes a WindowFactory from the list of registered factories.
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
void removeAllWindowTypeAliases()
Remove all registered window type alias mappings.
Abstract class that defines the required interface for all WindowFactory objects.
Definition: WindowFactory.h:117
const String & getTypeName() const
Get the string that describes the type of Window object this WindowFactory produces.
Definition: WindowFactory.h:152
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5580
struct used to hold mapping information required to create a falagard based window.
Definition: WindowFactoryManager.h:71