FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::ModelMapObserver Class Reference
+ Inheritance diagram for FIFE::ModelMapObserver:
+ Collaboration diagram for FIFE::ModelMapObserver:

Public Member Functions

 ModelMapObserver (Model *model)
 
virtual ~ModelMapObserver ()
 
virtual void onMapChanged (Map *map, std::vector< Layer * > &changedLayers)
 Called when some layer is changed on map. More...
 
virtual void onLayerCreate (Map *map, Layer *layer)
 Called when some layer gets created on the map. More...
 
virtual void onLayerDelete (Map *map, Layer *layer)
 Called when some layer gets deleted on map. More...
 
- Public Member Functions inherited from FIFE::MapChangeListener
virtual ~MapChangeListener ()
 

Private Attributes

Modelm_model
 

Detailed Description

Definition at line 48 of file model.cpp.

Constructor & Destructor Documentation

FIFE::ModelMapObserver::ModelMapObserver ( Model model)
inline

Definition at line 52 of file model.cpp.

virtual FIFE::ModelMapObserver::~ModelMapObserver ( )
inlinevirtual

Definition at line 55 of file model.cpp.

Member Function Documentation

virtual void FIFE::ModelMapObserver::onLayerCreate ( Map map,
Layer layer 
)
inlinevirtual

Called when some layer gets created on the map.

Parameters
mapwhere change occurred
layerwhich got created

Implements FIFE::MapChangeListener.

Definition at line 60 of file model.cpp.

virtual void FIFE::ModelMapObserver::onLayerDelete ( Map map,
Layer layer 
)
inlinevirtual

Called when some layer gets deleted on map.

Parameters
mapwhere change occurred
layerwhich will be deleted
Note
right after this call, layer actually gets deleted!

Implements FIFE::MapChangeListener.

Definition at line 63 of file model.cpp.

References FIFE::Layer::getCellGrid(), and FIFE::Model::removeCellGrid().

virtual void FIFE::ModelMapObserver::onMapChanged ( Map map,
std::vector< Layer * > &  changedLayers 
)
inlinevirtual

Called when some layer is changed on map.

See also
LayerChangeListener Layer is effectively changed, in case some of its instances is created, deleted or changed during latest update cycle
Parameters
mapwhere change occurred
changedLayerslist of layers containing some changes
Note
Does not report layer creations and deletions

Implements FIFE::MapChangeListener.

Definition at line 57 of file model.cpp.

Member Data Documentation

Model* FIFE::ModelMapObserver::m_model
private

Definition at line 49 of file model.cpp.


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