Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::WindowFactoryManager Class Reference

Class that manages WindowFactory objects. More...

#include <CEGUIWindowFactoryManager.h>

Inheritance diagram for CEGUI::WindowFactoryManager:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::WindowFactoryManager:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ConstBaseIterator<
WindowFactoryRegistry > 
WindowFactoryIterator
typedef ConstBaseIterator<
TypeAliasRegistry > 
TypeAliasIterator

Public Member Functions

 WindowFactoryManager (void)
 Constructs a new WindowFactoryManager object.
 ~WindowFactoryManager (void)
 Destructor for WindowFactoryManager objects.
void addFactory (WindowFactory *factory)
 Adds a new WindowFactory to the list of registered factories.
void removeFactory (const String &name)
 Removes a WindowFactory from the list of registered factories.
void removeFactory (WindowFactory *factory)
 Removes a WindowFactory from the list of registered factories.
void removeAllFactories (void)
 Remove all WindowFactory objects from the list.
WindowFactorygetFactory (const String &type) const
 Return a pointer to the specified WindowFactory object.
bool isFactoryPresent (const String &name) const
 Checks the list of registered WindowFactory objects for one which creates Window objects of the specified type.
void addWindowTypeAlias (const String &aliasName, const String &targetType)
 Adds an alias for a current window type.
void removeWindowTypeAlias (const String &aliasName, const String &targetType)
 Remove the specified alias mapping. If the alias mapping does not exist, nothing happens.
WindowFactoryIterator getIterator (void) const
 Return a WindowFactoryManager::WindowFactoryIterator object to iterate over the available WindowFactory types.
TypeAliasIterator getAliasIterator (void) const
 Return a WindowFactoryManager::TypeAliasIterator object to iterate over the defined aliases for window types.

Static Public Member Functions

WindowFactoryManagergetSingleton (void)
 Return singleton WindowFactoryManager object.
WindowFactoryManagergetSingletonPtr (void)
 Return pointer to singleton WindowFactoryManager object.

Static Protected Attributes

WindowFactoryManagerms_Singleton = NULL

Detailed Description

Class that manages WindowFactory objects.

Definition at line 51 of file CEGUIWindowFactoryManager.h.


Member Typedef Documentation

typedef ConstBaseIterator<TypeAliasRegistry> CEGUI::WindowFactoryManager::TypeAliasIterator
 

Definition at line 298 of file CEGUIWindowFactoryManager.h.

Referenced by getAliasIterator(), CEGUI::Scheme::loadResources(), CEGUI::Scheme::resourcesLoaded(), and CEGUI::Scheme::unloadResources().

typedef ConstBaseIterator<WindowFactoryRegistry> CEGUI::WindowFactoryManager::WindowFactoryIterator
 

Definition at line 297 of file CEGUIWindowFactoryManager.h.

Referenced by getIterator().


Constructor & Destructor Documentation

CEGUI::WindowFactoryManager::WindowFactoryManager void   )  [inline]
 

Constructs a new WindowFactoryManager object.

Definition at line 108 of file CEGUIWindowFactoryManager.h.

References CEGUI::utf8.

CEGUI::WindowFactoryManager::~WindowFactoryManager void   )  [inline]
 

Destructor for WindowFactoryManager objects.

Definition at line 118 of file CEGUIWindowFactoryManager.h.

References CEGUI::utf8.


Member Function Documentation

void CEGUI::WindowFactoryManager::addFactory WindowFactory factory  ) 
 

Adds a new WindowFactory to the list of registered factories.

Parameters:
factory Pointer to the WindowFactory to be added to the WindowManager.
Returns:
Nothing
Exceptions:
NullObjectException factory was null.
AlreadyExistsException factory provided a Window type name which is in use by another registered WindowFactory.

Definition at line 44 of file CEGUIWindowFactoryManager.cpp.

References CEGUI::WindowFactory::getTypeName(), and CEGUI::utf8.

void CEGUI::WindowFactoryManager::addWindowTypeAlias const String aliasName,
const String targetType
 

Adds an alias for a current window type.

This method allows you to create an alias for a specified window type. This means that you can then use either name as the type parameter when creating a window.

Note:
You need to be careful using this system. Creating an alias using a name that already exists will replace the previous mapping for that alias. Each alias name maintains a stack, which means that it is possible to remove an alias and have the previous alias restored. The windows created via an alias use the real type, so removing an alias after window creation is always safe (i.e. it is not the same as removing a real factory, which would cause an exception when trying to destroy a window with a missing factory).
Parameters:
aliasName String object holding the alias name. That is the name that targetType will also be known as from no on.
targetType String object holding the type window type name that is to be aliased. This type must already exist.
Returns:
Nothing.
Exceptions:
UnknownObjectException thrown if targetType is not known within the system.

Definition at line 178 of file CEGUIWindowFactoryManager.cpp.

References isFactoryPresent(), and CEGUI::utf8.

Referenced by CEGUI::Scheme::loadResources().

WindowFactoryManager::TypeAliasIterator CEGUI::WindowFactoryManager::getAliasIterator void   )  const
 

Return a WindowFactoryManager::TypeAliasIterator object to iterate over the defined aliases for window types.

Definition at line 169 of file CEGUIWindowFactoryManager.cpp.

References TypeAliasIterator.

Referenced by CEGUI::Scheme::loadResources(), CEGUI::Scheme::resourcesLoaded(), and CEGUI::Scheme::unloadResources().

WindowFactory * CEGUI::WindowFactoryManager::getFactory const String type  )  const
 

Return a pointer to the specified WindowFactory object.

Parameters:
type String holding the Window object type to return the WindowFactory for.
Returns:
Pointer to the WindowFactory object that creates Windows of the type type.
Exceptions:
UnknownObjectException No WindowFactory object for Window objects of type type was found.

Definition at line 92 of file CEGUIWindowFactoryManager.cpp.

References CEGUI::utf8.

WindowFactoryManager::WindowFactoryIterator CEGUI::WindowFactoryManager::getIterator void   )  const
 

Return a WindowFactoryManager::WindowFactoryIterator object to iterate over the available WindowFactory types.

Definition at line 159 of file CEGUIWindowFactoryManager.cpp.

References WindowFactoryIterator.

WindowFactoryManager & CEGUI::WindowFactoryManager::getSingleton void   )  [static]
 

Return singleton WindowFactoryManager object.

Returns:
Singleton WindowFactoryManager object

Reimplemented from CEGUI::Singleton< WindowFactoryManager >.

Definition at line 143 of file CEGUIWindowFactoryManager.cpp.

WindowFactoryManager * CEGUI::WindowFactoryManager::getSingletonPtr void   )  [static]
 

Return pointer to singleton WindowFactoryManager object.

Returns:
Pointer to singleton WindowFactoryManager object

Reimplemented from CEGUI::Singleton< WindowFactoryManager >.

Definition at line 149 of file CEGUIWindowFactoryManager.cpp.

bool CEGUI::WindowFactoryManager::isFactoryPresent const String name  )  const
 

Checks the list of registered WindowFactory objects for one which creates Window objects of the specified type.

Parameters:
name String containing the name (technically, Window type name) of the WindowFactory to check for.
Returns:
true if a WindowFactory that creates Window objects of type name is registered. Else, false.

Definition at line 127 of file CEGUIWindowFactoryManager.cpp.

Referenced by addWindowTypeAlias(), CEGUI::Scheme::loadResources(), and CEGUI::Scheme::resourcesLoaded().

void CEGUI::WindowFactoryManager::removeAllFactories void   )  [inline]
 

Remove all WindowFactory objects from the list.

Returns:
Nothing

Definition at line 204 of file CEGUIWindowFactoryManager.h.

void CEGUI::WindowFactoryManager::removeFactory WindowFactory factory  ) 
 

Removes a WindowFactory from the list of registered factories.

Note:
The WindowFactory object is not destroyed (since it was created externally), instead it is just removed from the list.
Parameters:
factory Pointer to the factory object to be removed. If factory is null, or if no such WindowFactory is in the list, no error occurs (nothing happens).
Returns:
Nothing

Definition at line 79 of file CEGUIWindowFactoryManager.cpp.

References CEGUI::WindowFactory::getTypeName(), and removeFactory().

void CEGUI::WindowFactoryManager::removeFactory const String name  ) 
 

Removes a WindowFactory from the list of registered factories.

Note:
The WindowFactory object is not destroyed (since it was created externally), instead it is just removed from the list.
Parameters:
name String which holds the name (technically, Window type name) of the WindowFactory to be removed. If name is not in the list, no error occurs (nothing happens).
Returns:
Nothing

Definition at line 68 of file CEGUIWindowFactoryManager.cpp.

References CEGUI::utf8.

Referenced by removeFactory(), and CEGUI::Scheme::unloadResources().

void CEGUI::WindowFactoryManager::removeWindowTypeAlias const String aliasName,
const String targetType
 

Remove the specified alias mapping. If the alias mapping does not exist, nothing happens.

Note:
You are required to supply both the alias and target names because there may exist more than one entry for a given alias - therefore you are required to be explicit about which alias is to be removed.
Parameters:
aliasName String object holding the alias name.
targetType String object holding the type window type name that was aliased.
Returns:
Nothing.

Definition at line 205 of file CEGUIWindowFactoryManager.cpp.

References CEGUI::Informative, and CEGUI::utf8.

Referenced by CEGUI::Scheme::unloadResources().


Member Data Documentation

WindowFactoryManager * CEGUI::Singleton< WindowFactoryManager >::ms_Singleton = NULL [static, protected, inherited]
 

Definition at line 38 of file CEGUIWindowFactoryManager.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 16 12:41:12 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1