![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Abstraction for path finding destinations. More...
#include <path_finder.h>
Inheritance diagram for freeciv::destination:Public Member Functions | |
| virtual | ~destination () |
| Destructor. More... | |
Protected Member Functions | |
| virtual bool | reached (const detail::vertex &vertex) const =0 |
| Checks if a vertex should be considered as being at the destination. More... | |
| virtual path_finder::storage_type::const_iterator | find_best (const path_finder::storage_type &map, std::size_t num_waypoints) const |
| Returns an iterator to the best vertex that is a destination vertex. More... | |
Friends | |
| class | path_finder |
| class | path_finder::path_finder_private |
Abstraction for path finding destinations.
The path finding algorithm can find paths not only to single tiles, but to any set of vertices. This class is used to specify which vertices are valid destinations.
Definition at line 148 of file path_finder.h.
|
inlinevirtual |
Destructor.
Definition at line 156 of file path_finder.h.
|
protectedvirtual |
Returns an iterator to the best vertex that is a destination vertex.
The default implementation calls reached for every vertex.
Reimplemented in freeciv::tile_destination.
Definition at line 819 of file path_finder.cpp.
Referenced by freeciv::path_finder::find_path(), and freeciv::path_finder::path_finder_private::run_search().
|
protectedpure virtual |
Checks if a vertex should be considered as being at the destination.
Implemented in freeciv::refuel_destination, freeciv::allied_city_destination, and freeciv::tile_destination.
Referenced by find_best(), freeciv::path_finder::find_path(), and freeciv::path_finder::path_finder_private::is_reached().
|
friend |
Definition at line 150 of file path_finder.h.
|
friend |
Definition at line 151 of file path_finder.h.