Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

BaseMapItemTypeWidgetFactory< MapItemWidget > Class Template Reference

The BaseMapItemTypeWidgetFactory iterates through all items of an ItemRepository and spawns a MapItemTypeWidget for it. More...

#include <edselfnt.h>

Inheritance diagram for BaseMapItemTypeWidgetFactory< MapItemWidget >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 BaseMapItemTypeWidgetFactory (const ItemRepository< ItemType > &itemRepository)
void restart ()
SelectionWidgetspawnNextItem (PG_Widget *parent, const PG_Point &pos)

Protected Types

typedef MapItemWidget::ItemType ItemType
typedef vector< ItemType * > Items

Protected Member Functions

virtual bool isFiltered (const ItemType &item)
virtual void registerItem (MapItemWidget *item)

Protected Attributes

Items::iterator it

Detailed Description

template<class MapItemWidget>
class BaseMapItemTypeWidgetFactory< MapItemWidget >

The BaseMapItemTypeWidgetFactory iterates through all items of an ItemRepository and spawns a MapItemTypeWidget for it.

It is will belong to a SelectionWidget , which will control the MapItemTypeWidget generation.

This class does nothing if a widget is selected. This behaviour must be added by derived classes.

Definition at line 91 of file edselfnt.h.


Member Typedef Documentation

template<class MapItemWidget>
typedef vector<ItemType*> BaseMapItemTypeWidgetFactory< MapItemWidget >::Items [protected]
 

Definition at line 94 of file edselfnt.h.

template<class MapItemWidget>
typedef MapItemWidget::ItemType BaseMapItemTypeWidgetFactory< MapItemWidget >::ItemType [protected]
 

Reimplemented in MapItemTypeWidgetFactory< MapItemWidget >, and MapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >.

Definition at line 93 of file edselfnt.h.


Constructor & Destructor Documentation

template<class MapItemWidget>
BaseMapItemTypeWidgetFactory< MapItemWidget >::BaseMapItemTypeWidgetFactory const ItemRepository< ItemType > &  itemRepository  )  [inline]
 

Definition at line 110 of file edselfnt.h.


Member Function Documentation

template<class MapItemWidget>
virtual bool BaseMapItemTypeWidgetFactory< MapItemWidget >::isFiltered const ItemType item  )  [inline, protected, virtual]
 

Reimplemented in CargoItemFactory, and ProductionItemFactory.

Definition at line 99 of file edselfnt.h.

Referenced by BaseMapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >::spawnNextItem().

template<class MapItemWidget>
virtual void BaseMapItemTypeWidgetFactory< MapItemWidget >::registerItem MapItemWidget *  item  )  [inline, protected, virtual]
 

Reimplemented in MapItemTypeWidgetFactory_IDSelection< MapItemWidget >.

Definition at line 103 of file edselfnt.h.

Referenced by BaseMapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >::spawnNextItem().

template<class MapItemWidget>
void BaseMapItemTypeWidgetFactory< MapItemWidget >::restart  )  [inline, virtual]
 

Implements SelectionItemFactory.

Definition at line 120 of file edselfnt.h.

Referenced by BaseMapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >::BaseMapItemTypeWidgetFactory().

template<class MapItemWidget>
SelectionWidget* BaseMapItemTypeWidgetFactory< MapItemWidget >::spawnNextItem PG_Widget parent,
const PG_Point pos
[inline, virtual]
 

Implements SelectionItemFactory.

Definition at line 125 of file edselfnt.h.


Member Data Documentation

template<class MapItemWidget>
Items::iterator BaseMapItemTypeWidgetFactory< MapItemWidget >::it [protected]
 

Definition at line 95 of file edselfnt.h.

Referenced by BaseMapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >::restart(), and BaseMapItemTypeWidgetFactory< MapItemTypeWidget< Vehicletype > >::spawnNextItem().


The documentation for this class was generated from the following file:
Generated on Tue Jun 24 02:16:21 2008 for Advanced Strategic Command by  doxygen 1.4.2