22 #ifndef FIFE_TRIGGER_CONTROLLER_H 23 #define FIFE_TRIGGER_CONTROLLER_H 218 bool exists(
const std::string& name);
std::map< std::string, Trigger *>::const_iterator TriggerNameMapConstIterator
std::map< std::string, Trigger *> TriggerNameMap
Trigger * createTriggerOnRect(const std::string &triggerName, Layer *layer, const Rect &rec)
Creates and adds a trigger to the cells on the specified layer and rect.
void removeTriggerFromCoordinate(const std::string &triggerName, Layer *layer, const ModelCoordinate &pt)
Removes a trigger from the cell on the specified layer and coordinate.
Trigger * createTriggerOnInstance(const std::string &triggerName, Instance *instance)
Creates and attach a trigger to the specified instance.
Trigger * createTriggerOnCoordinate(const std::string &triggerName, Layer *layer, const ModelCoordinate &pt)
Creates and adds a trigger to the cell on the specified layer and coordinate.
Trigger * createTriggerOnCoordinates(const std::string &triggerName, Layer *layer, const std::vector< ModelCoordinate > &coords)
Creates and adds a trigger to the cells on the specified layer and coordinates.
Base class for all fife classes Used e.g.
virtual ~TriggerController()
Destructor.
void removeTriggerFromCell(const std::string &triggerName, Cell *cell)
Removes a trigger from the specified cell.
Trigger * createTriggerOnLocation(const std::string &triggerName, const Location &loc)
Creates and adds a trigger to the cell on the specified location.
std::vector< Trigger * > getAllTriggers()
Returns a vector with all trigger pointers.
Map * m_map
Pointer to the map this controller is associated with.
std::pair< std::string, Trigger *> TriggerNameMapPair
std::vector< std::string > getAllTriggerNames()
Returns a vector with all trigger names.
Trigger * getTrigger(const std::string &triggerName)
Returns a pointer to the trigger with the given name.
std::map< std::string, Trigger *>::iterator TriggerNameMapIterator
A basic cell on a CellCache.
Trigger * createTriggerOnCell(const std::string &triggerName, Cell *cell)
Creates and adds a trigger to the specified cell.
void removeTriggerFromInstance(const std::string &triggerName, Instance *instance)
Detach a trigger from the specified instance.
void deleteTrigger(const std::string &triggerName)
Deletes a trigger with the given name.
void removeTriggerFromRect(const std::string &triggerName, Layer *layer, const Rect &rec)
Removes a trigger from the cell on the specified layer and coordinates.
void removeTriggerFromLocations(const std::string &triggerName, const std::vector< Location > &locs)
Removes a trigger from the cell on the specified locations.
Trigger * createTrigger(const std::string &triggerName)
Creates a trigger.
Trigger get triggered when a specific set of criteria are met.
Trigger * createTriggerOnLocations(const std::string &triggerName, const std::vector< Location > &locs)
Creates and adds a trigger to the cell on the specified locations.
bool exists(const std::string &name)
Checks to see if the trigger name already exists.
This class serves as a central place to manage triggers for a Map.
Trigger * createTriggerOnCells(const std::string &triggerName, const std::vector< Cell *> &cells)
Creates and adds a trigger to the specified cells.
TriggerNameMap m_triggerNameMap
Trigger name map.
void removeTriggerFromCells(const std::string &triggerName, const std::vector< Cell *> &cells)
Removes a trigger from the specified cells.
void removeTriggerFromCoordinates(const std::string &triggerName, Layer *layer, const std::vector< ModelCoordinate > &coords)
Removes a trigger from the cell on the specified layer and coordinates.
void removeTriggerFromLocation(const std::string &triggerName, const Location &loc)
Removes a trigger from the cell on the specified location.
An Instance is an "instantiation" of an Object at a Location.
TriggerController(Map *map)
Constructor.