30 #ifndef _CEGUIWindowFactoryManager_h_
31 #define _CEGUIWindowFactoryManager_h_
33 #include "CEGUI/Base.h"
34 #include "CEGUI/String.h"
35 #include "CEGUI/Singleton.h"
36 #include "CEGUI/Logger.h"
37 #include "CEGUI/IteratorBase.h"
38 #include "CEGUI/WindowFactory.h"
39 #include "CEGUI/TplWindowFactory.h"
40 #include "CEGUI/Exceptions.h"
45 # pragma warning(push)
46 # pragma warning(disable : 4275)
47 # pragma warning(disable : 4251)
108 const String& getActiveTarget(
void)
const;
117 uint getStackedTargetCount(
void)
const;
123 typedef std::vector<
String
124 CEGUI_VECTOR_ALLOC(
String)> TargetTypeStack;
126 TargetTypeStack d_targetStack;
146 Logger::getSingleton().logEvent(
"CEGUI::WindowFactoryManager singleton destroyed");
181 template <
typename T>
182 static void addFactory();
198 template <
typename T>
199 static void addWindowType();
215 void removeFactory(
const String& name);
242 void removeAllFactories(
void);
274 bool isFactoryPresent(
const String& name)
const;
302 void addWindowTypeAlias(
const String& aliasName,
const String& targetType);
322 void removeWindowTypeAlias(
const String& aliasName,
const String& targetType);
328 void removeAllWindowTypeAliases();
361 void addFalagardWindowMapping(
const String& newType,
374 void removeFalagardWindowMapping(
const String& type);
380 void removeAllFalagardWindowMappings();
393 bool isFalagardMappedType(
const String& type)
const;
407 const String& getMappedLookForType(
const String& type)
const;
421 const String& getMappedRendererForType(
const String& type)
const;
441 String getDereferencedAliasType(
const String& type)
const;
455 const FalagardWindowMapping& getFalagardMappingForType(
const String& type)
const;
464 CEGUI_MAP_ALLOC(
String, AliasTargetStack)> TypeAliasRegistry;
466 CEGUI_MAP_ALLOC(
String, FalagardWindowMapping)> FalagardMapRegistry;
471 WindowFactoryRegistry d_factoryRegistry;
472 TypeAliasRegistry d_aliasRegistry;
473 FalagardMapRegistry d_falagardRegistry;
475 static OwnedWindowFactoryList d_ownedFactories;
489 WindowFactoryIterator getIterator(
void)
const;
496 TypeAliasIterator getAliasIterator(
void)
const;
503 FalagardMappingIterator getFalagardMappingIterator()
const;
507 template <
typename T>
511 WindowFactory* factory = CEGUI_NEW_AO T;
514 if (WindowFactoryManager::getSingletonPtr())
516 Logger::getSingleton().logEvent(
"Created WindowFactory for '" +
517 factory->getTypeName() +
522 WindowFactoryManager::getSingleton().addFactory(factory);
524 CEGUI_CATCH (Exception&)
526 Logger::getSingleton().logEvent(
"Deleted WindowFactory for '" +
527 factory->getTypeName() +
530 CEGUI_DELETE_AO factory;
535 d_ownedFactories.push_back(factory);
539 template <
typename T>
542 WindowFactoryManager::addFactory<TplWindowFactory<T> >();
550 #if defined(_MSC_VER)
551 # pragma warning(pop)
554 #endif // end of guard _CEGUIWindowFactoryManager_h_