Crazy Eddies GUI System  0.7.2
Public Member Functions | List of all members
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 >:

Public Member Functions

 TplWindowFactory ()
 Default constructor.
 
WindowcreateWindow (const String &name)
 Create a new Window object of whatever type this WindowFactory produces. More...
 
void destroyWindow (Window *window)
 Destroys the given Window object. More...
 
- Public Member Functions inherited from CEGUI::WindowFactory
const StringgetTypeName () const
 Get the string that describes the type of Window object this WindowFactory produces. More...
 
virtual ~WindowFactory ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from CEGUI::WindowFactory
 WindowFactory (const String &type)
 Constructor.
 
- Protected Attributes inherited from CEGUI::WindowFactory
String d_type
 String holding the type of object created by this factory.
 

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.