Crazy Eddie's GUI System
0.8.7
|
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)
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;
473 static OwnedWindowFactoryList d_ownedFactories;
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_
Definition: Singleton.h:56
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(const String &name)
Removes a WindowFactory from the list of registered factories.
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
const FalagardWindowMapping & getFalagardMappingForType(const String &type) const
Return the FalagardWindowMapping for the specified window mapping type.
const String & getMappedRendererForType(const String &type) const
Return the name of the WindowRenderer assigned to the specified window mapping.
const String & getActiveTarget(void) const
Return a String holding the current target type for this stack.
void removeAllFalagardWindowMappings()
Remove all registered falagard type mappings.
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
WindowFactoryManager(void)
Constructs a new WindowFactoryManager object.
FalagardMappingIterator getFalagardMappingIterator() const
Return a WindowFactoryManager::FalagardMappingIterator object to iterate over the defined falagard wi...
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
~AliasTargetStack(void)
Destructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:97
WindowFactory * getFactory(const String &type) const
Return a pointer to the specified WindowFactory object.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Definition: MemoryAllocatedObject.h:110
void removeWindowTypeAlias(const String &aliasName, const String &targetType)
Remove the specified alias mapping. If the alias mapping does not exist, nothing happens.
Abstract class that defines the required interface for all WindowFactory objects.
Definition: WindowFactory.h:117
void removeFactory(WindowFactory *factory)
Removes a WindowFactory from the list of registered factories.
const String & getMappedLookForType(const String &type) const
Return the name of the LookN'Feel assigned to the specified window mapping.
AliasTargetStack(void)
Constructor for WindowAliasTargetStack objects.
Definition: WindowFactoryManager.h:90
~WindowFactoryManager(void)
Destructor for WindowFactoryManager objects.
Definition: WindowFactoryManager.h:143
bool isFalagardMappedType(const String &type) const
Return whether the given type is a falagard mapped type.
Class used to track active alias targets for Window factory types.
Definition: WindowFactoryManager.h:84
void removeFalagardWindowMapping(const String &type)
Remove the specified falagard type mapping if it exists.
void removeAllWindowTypeAliases()
Remove all registered window type alias mappings.
void addFactory(WindowFactory *factory)
Adds a new WindowFactory to the list of registered factories.
iterator class for maps
Definition: IteratorBase.h:197
const String & getTypeName() const
Get the string that describes the type of Window object this WindowFactory produces.
Definition: WindowFactory.h:152
Root exception class used within the GUI system.
Definition: Exceptions.h:49
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...
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...
String class used within the GUI system.
Definition: String.h:64
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.
struct used to hold mapping information required to create a falagard based window.
Definition: WindowFactoryManager.h:71
void addWindowTypeAlias(const String &aliasName, const String &targetType)
Adds an alias for a current window type.
Class that manages WindowFactory objects.
Definition: WindowFactoryManager.h:64
uint getStackedTargetCount(void) const
Return the number of stacked target types in the stack.