Advanced Strategic Command
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
BuildingTypeSelectionItemFactory Class Referenceabstract

#include <buildingtypeselector.h>

Inheritance diagram for BuildingTypeSelectionItemFactory:
Inheritance graph
[legend]

Public Types

typedef vector< const
BuildingType * > 
Container
 

Public Member Functions

 BuildingTypeSelectionItemFactory (Resources plantResources, const Container &types, const Player &player)
 
void restart ()
 
void setAvailableResource (const Resources &plantResources)
 
SelectionWidgetspawnNextItem (PG_Widget *parent, const PG_Point &pos)
 
void itemSelected (const SelectionWidget *widget, bool mouse)
 
- Public Member Functions inherited from SelectionItemFactory
virtual void itemMarked (const SelectionWidget *widget)
 
virtual SelectionWidgetgetDefaultItem ()
 
virtual ~SelectionItemFactory ()
 

Public Attributes

sigc::signal< void > reloadAllItems
 

Protected Member Functions

virtual void BuildingTypeSelected (const BuildingType *type)=0
 
virtual Resources getCost (const BuildingType *type)
 

Protected Attributes

Container::iterator it
 
Container items
 

Detailed Description

Definition at line 57 of file buildingtypeselector.h.

Member Typedef Documentation

Definition at line 61 of file buildingtypeselector.h.

Constructor & Destructor Documentation

BuildingTypeSelectionItemFactory::BuildingTypeSelectionItemFactory ( Resources  plantResources,
const Container types,
const Player player 
)

Definition at line 130 of file buildingtypeselector.cpp.

References restart(), and setAvailableResource().

Member Function Documentation

virtual void BuildingTypeSelectionItemFactory::BuildingTypeSelected ( const BuildingType type)
protectedpure virtual
Resources BuildingTypeSelectionItemFactory::getCost ( const BuildingType type)
protectedvirtual

Definition at line 169 of file buildingtypeselector.cpp.

References ContainerBaseType::productionCost.

Referenced by spawnNextItem().

void BuildingTypeSelectionItemFactory::itemSelected ( const SelectionWidget widget,
bool  mouse 
)
virtual
void BuildingTypeSelectionItemFactory::restart ( )
virtual

Implements SelectionItemFactory.

Definition at line 146 of file buildingtypeselector.cpp.

References BuildingComp(), it, and items.

Referenced by BuildingTypeSelectionItemFactory().

void BuildingTypeSelectionItemFactory::setAvailableResource ( const Resources plantResources)
inline

Definition at line 81 of file buildingtypeselector.h.

Referenced by BuildingTypeSelectionItemFactory().

SelectionWidget * BuildingTypeSelectionItemFactory::spawnNextItem ( PG_Widget *  parent,
const PG_Point &  pos 
)
virtual

Implements SelectionItemFactory.

Definition at line 154 of file buildingtypeselector.cpp.

References getCost(), it, items, and Resources::resource().

Member Data Documentation

Container::iterator BuildingTypeSelectionItemFactory::it
protected

Definition at line 64 of file buildingtypeselector.h.

Referenced by restart(), and spawnNextItem().

Container BuildingTypeSelectionItemFactory::items
protected

Definition at line 65 of file buildingtypeselector.h.

Referenced by restart(), and spawnNextItem().

sigc::signal<void> BuildingTypeSelectionItemFactory::reloadAllItems

Definition at line 77 of file buildingtypeselector.h.


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