Freeciv21
Develop your civilization from humble roots to a global empire
freeciv::allied_city_destination Class Reference

A path finding destination that accepts any allied city. More...

#include <path_finder.h>

+ Inheritance diagram for freeciv::allied_city_destination:
+ Collaboration diagram for freeciv::allied_city_destination:

Public Member Functions

 allied_city_destination (const player *allied_with)
 Constructor. More...
 
 ~allied_city_destination ()
 Destructor. More...
 
- Public Member Functions inherited from freeciv::destination
virtual ~destination ()
 Destructor. More...
 

Protected Member Functions

bool reached (const detail::vertex &vertex) const override
 Checks if a vertex should be considered as being at the destination. More...
 
- Protected Member Functions inherited from freeciv::destination
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...
 

Private Attributes

const playerm_player
 

Detailed Description

A path finding destination that accepts any allied city.

Definition at line 202 of file path_finder.h.

Constructor & Destructor Documentation

◆ allied_city_destination()

freeciv::allied_city_destination::allied_city_destination ( const player allied_with)
inlineexplicit

Constructor.

Definition at line 207 of file path_finder.h.

◆ ~allied_city_destination()

freeciv::allied_city_destination::~allied_city_destination ( )
inline

Destructor.

Definition at line 216 of file path_finder.h.

Member Function Documentation

◆ reached()

bool freeciv::allied_city_destination::reached ( const detail::vertex vertex) const
overrideprotectedvirtual

Checks if a vertex should be considered as being at the destination.

Implements freeciv::destination.

Definition at line 869 of file path_finder.cpp.

Member Data Documentation

◆ m_player

const player* freeciv::allied_city_destination::m_player
private

Definition at line 222 of file path_finder.h.

Referenced by allied_city_destination(), and reached().