Crazy Eddie's GUI System  0.8.4
CEGUI::TplWindowFactory< T > Class Template Reference

Template based WindowFactory that can be used to automatically generate a WindowFactory given a Window based class. More...

+ Inheritance diagram for CEGUI::TplWindowFactory< T >:
+ Collaboration diagram for CEGUI::TplWindowFactory< T >:

List of all members.

Public Member Functions

 TplWindowFactory ()
 Default constructor.
WindowcreateWindow (const String &name)
 Create a new Window object of whatever type this WindowFactory produces.
void destroyWindow (Window *window)
 Destroys the given Window object.

Detailed Description

template<typename T>
class CEGUI::TplWindowFactory< T >

Template based WindowFactory that can be used to automatically generate a WindowFactory given a Window based class.

The advantage of this over the previous macro based methods is that there is no longer any need to have any supporting code or structure in order to add new Window types to the system, rather you can just do:

    CEGUI::WindowFactoryManager::addFactory<TplWindowFactory<MyWidget> >();
Template Parameters:
TSpecifies the Window based class that the factory will create and destroy instances of.

Member Function Documentation

template<typename T >
Window * CEGUI::TplWindowFactory< T >::createWindow ( const String name) [virtual]

Create a new Window object of whatever type this WindowFactory produces.

Parameters:
nameA unique name that is to be assigned to the newly created Window object
Returns:
Pointer to the new Window object.

Implements CEGUI::WindowFactory.

template<typename T >
void CEGUI::TplWindowFactory< T >::destroyWindow ( Window window) [virtual]

Destroys the given Window object.

Parameters:
windowPointer to the Window object to be destroyed.
Returns:
Nothing.

Implements CEGUI::WindowFactory.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends