Crazy Eddies GUI System: CEGUI::TplWindowFactory< T > Class Template Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
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 >:
[legend]
Collaboration diagram for CEGUI::TplWindowFactory< T >:
[legend]

List of all members.

## Public Member Functions
| TplWindowFactory ()
| Default constructor.
Window * | createWindow (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:

  T | Specifies 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:

  name | A 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:

  window | Pointer to the Window object to be destroyed.

Returns:
  Nothing.

Implements CEGUI::WindowFactory.