Advanced Strategic Command
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
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

Public Member Functions

 BaseMapItemTypeWidgetFactory (const ItemRepository< ItemType > &itemRepository)
void restart ()
SelectionWidgetspawnNextItem (PG_Widget *parent, const PG_Point &pos)
- Public Member Functions inherited from SelectionItemFactory
virtual void itemSelected (const SelectionWidget *widget, bool mouse)=0
virtual void itemMarked (const SelectionWidget *widget)
virtual SelectionWidgetgetDefaultItem ()
virtual ~SelectionItemFactory ()

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

Definition at line 94 of file edselfnt.h.

template<class MapItemWidget>
typedef MapItemWidget::ItemType BaseMapItemTypeWidgetFactory< MapItemWidget >::ItemType

Definition at line 93 of file edselfnt.h.

Constructor & Destructor Documentation

template<class MapItemWidget>
BaseMapItemTypeWidgetFactory< MapItemWidget >::BaseMapItemTypeWidgetFactory ( const ItemRepository< ItemType > &  itemRepository)

Definition at line 110 of file edselfnt.h.

Member Function Documentation

template<class MapItemWidget>
virtual bool BaseMapItemTypeWidgetFactory< MapItemWidget >::isFiltered ( const ItemType item)
template<class MapItemWidget>
virtual void BaseMapItemTypeWidgetFactory< MapItemWidget >::registerItem ( MapItemWidget *  item)
template<class MapItemWidget>
void BaseMapItemTypeWidgetFactory< MapItemWidget >::restart ( )
template<class MapItemWidget>
SelectionWidget* BaseMapItemTypeWidgetFactory< MapItemWidget >::spawnNextItem ( PG_Widget *  parent,
const PG_Point &  pos 

Implements SelectionItemFactory.

Definition at line 125 of file edselfnt.h.

Member Data Documentation

template<class MapItemWidget>
Items::iterator BaseMapItemTypeWidgetFactory< MapItemWidget >::it

The documentation for this class was generated from the following file: