#include <gameevents.h>
Inheritance diagram for FieldAddressing:

Public Types | |
| typedef vector< MapCoordinate > | Fields |
| typedef vector< Poly_gon > | Polygons |
Public Member Functions | |
| void | setField (const MapCoordinate &pos) |
| void | setPolygon (const Poly_gon &poly_gon) |
| void | setGlobal () |
| virtual | ~FieldAddressing () |
Protected Types | |
| enum | AddressingMode { none, singleField, poly, global } |
Protected Member Functions | |
| FieldAddressing (GameMap *&gamemap) | |
| void | readMapModificationData (tnstream &stream) |
| void | writeMapModificationData (tnstream &stream) |
| virtual void | fieldOperator (const MapCoordinate &mc)=0 |
| void | operate () |
| void | setpointabs (int x, int y) |
| void | setup () |
Protected Attributes | |
| AddressingMode | addressingMode |
| Fields | fields |
| Polygons | polygons |
Friends | |
| Event * | readOldEvent (tnstream *stream, GameMap *gamemap, map< int, int > &eventTranslation, map< EventTriggered *, int > &eventTriggerEvents) |
Definition at line 86 of file gameevents.h.
| typedef vector<MapCoordinate> FieldAddressing::Fields |
Definition at line 89 of file gameevents.h.
| typedef vector< Poly_gon > FieldAddressing::Polygons |
Definition at line 90 of file gameevents.h.
enum FieldAddressing::AddressingMode [protected] |
| virtual FieldAddressing::~FieldAddressing | ( | ) | [inline, virtual] |
Definition at line 95 of file gameevents.h.
| FieldAddressing::FieldAddressing | ( | GameMap *& | gamemap | ) | [inline, protected] |
Definition at line 98 of file gameevents.h.
| void FieldAddressing::setField | ( | const MapCoordinate & | pos | ) |
Definition at line 1025 of file gameevents.cpp.
References addressingMode, fields, and singleField.
Referenced by readOldEvent().
| void FieldAddressing::setPolygon | ( | const Poly_gon & | poly_gon | ) |
Definition at line 1032 of file gameevents.cpp.
References addressingMode, poly, and polygons.
Referenced by readOldEvent(), and CopyMap::selectArea().
| void FieldAddressing::setGlobal | ( | ) |
Definition at line 1039 of file gameevents.cpp.
References addressingMode, and global.
Referenced by readOldEvent().
| void FieldAddressing::readMapModificationData | ( | tnstream & | stream | ) | [protected] |
Definition at line 1046 of file gameevents.cpp.
References addressingMode, fields, poly, polygons, readClassContainer(), tnstream::readInt(), singleField, and versionTest().
Referenced by RemoveAllObjects::readData(), AddObject::readData(), MapChange::readData(), WeatherChange::readData(), AnyUnitEntersPolygon::readData(), and SpecificUnitEntersPolygon::readData().
| void FieldAddressing::writeMapModificationData | ( | tnstream & | stream | ) | [protected] |
Definition at line 1083 of file gameevents.cpp.
References addressingMode, fields, poly, polygons, singleField, writeClassContainer(), and tnstream::writeInt().
Referenced by RemoveAllObjects::writeData(), AddObject::writeData(), MapChange::writeData(), WeatherChange::writeData(), AnyUnitEntersPolygon::writeData(), and SpecificUnitEntersPolygon::writeData().
| virtual void FieldAddressing::fieldOperator | ( | const MapCoordinate & | mc | ) | [protected, pure virtual] |
Implemented in CopyMap, SpecificUnitEntersPolygon, AnyUnitEntersPolygon, WeatherChange, MapChange, AddObject, and RemoveAllObjects.
Referenced by operate(), and setpointabs().
| void FieldAddressing::operate | ( | ) | [protected] |
Definition at line 1008 of file gameevents.cpp.
References addressingMode, fieldOperator(), fields, global, PolygonPainterSquareCoordinate::paintPolygon(), poly, polygons, singleField, GameMap::xsize, and GameMap::ysize.
Referenced by AnyUnitEntersPolygon::arm(), SpecificUnitEntersPolygon::arm(), CopyMap::copy(), MapModificationEvent::execute(), AnyUnitEntersPolygon::getState(), and SpecificUnitEntersPolygon::getState().
| void FieldAddressing::setpointabs | ( | int | x, | |
| int | y | |||
| ) | [protected, virtual] |
Implements PolygonPainterSquareCoordinate.
Definition at line 1003 of file gameevents.cpp.
References fieldOperator().
| void FieldAddressing::setup | ( | ) | [protected] |
Reimplemented in SpecificUnitEntersPolygon, AnyUnitEntersPolygon, WeatherChange, MapChange, AddObject, and RemoveAllObjects.
Definition at line 1058 of file gameevents.cpp.
References addressingMode, chooseString(), editpolygon(), fields, poly, polygons, selectFields(), and singleField.
Referenced by RemoveAllObjects::setup(), AddObject::setup(), MapChange::setup(), WeatherChange::setup(), AnyUnitEntersPolygon::setup(), and SpecificUnitEntersPolygon::setup().
| Event* readOldEvent | ( | tnstream * | stream, | |
| GameMap * | gamemap, | |||
| map< int, int > & | eventTranslation, | |||
| map< EventTriggered *, int > & | eventTriggerEvents | |||
| ) | [friend] |
AddressingMode FieldAddressing::addressingMode [protected] |
Definition at line 101 of file gameevents.h.
Referenced by CopyMap::CopyMap(), operate(), readMapModificationData(), setField(), setGlobal(), setPolygon(), setup(), and writeMapModificationData().
Fields FieldAddressing::fields [protected] |
Definition at line 102 of file gameevents.h.
Referenced by operate(), readMapModificationData(), setField(), setup(), and writeMapModificationData().
Polygons FieldAddressing::polygons [protected] |
Definition at line 103 of file gameevents.h.
Referenced by operate(), readMapModificationData(), CopyMap::selectArea(), setPolygon(), setup(), and writeMapModificationData().
1.5.1