The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Private Attributes | List of all members
pathfind::shortest_path_calculator Struct Reference

#include <pathfind.hpp>

Inheritance diagram for pathfind::shortest_path_calculator:
Inheritance graph

Public Member Functions

 shortest_path_calculator (const unit &u, const team &t, const std::vector< team > &teams, const gamemap &map, bool ignore_unit=false, bool ignore_defense_=false, bool see_all=false)
 
virtual double cost (const map_location &loc, const double so_far) const
 
- Public Member Functions inherited from pathfind::cost_calculator
 cost_calculator ()
 
virtual ~cost_calculator ()
 

Private Attributes

const unitunit_
 
const teamviewing_team_
 
const std::vector< team > & teams_
 
const gamemapmap_
 
const int movement_left_
 
const int total_movement_
 
bool const ignore_unit_
 
bool const ignore_defense_
 
bool see_all_
 

Additional Inherited Members

- Static Public Member Functions inherited from pathfind::cost_calculator
static double getNoPathValue ()
 

Detailed Description

Definition at line 203 of file pathfind.hpp.

Constructor & Destructor Documentation

◆ shortest_path_calculator()

pathfind::shortest_path_calculator::shortest_path_calculator ( const unit u,
const team t,
const std::vector< team > &  teams,
const gamemap map,
bool  ignore_unit = false,
bool  ignore_defense_ = false,
bool  see_all = false 
)

Definition at line 725 of file pathfind.cpp.

Member Function Documentation

◆ cost()

double pathfind::shortest_path_calculator::cost ( const map_location loc,
const double  so_far 
) const
virtual

Member Data Documentation

◆ ignore_defense_

bool const pathfind::shortest_path_calculator::ignore_defense_
private

Definition at line 219 of file pathfind.hpp.

Referenced by cost().

◆ ignore_unit_

bool const pathfind::shortest_path_calculator::ignore_unit_
private

Definition at line 218 of file pathfind.hpp.

Referenced by cost().

◆ map_

const gamemap& pathfind::shortest_path_calculator::map_
private

Definition at line 215 of file pathfind.hpp.

Referenced by cost().

◆ movement_left_

const int pathfind::shortest_path_calculator::movement_left_
private

Definition at line 216 of file pathfind.hpp.

Referenced by cost().

◆ see_all_

bool pathfind::shortest_path_calculator::see_all_
private

Definition at line 220 of file pathfind.hpp.

Referenced by cost().

◆ teams_

const std::vector<team>& pathfind::shortest_path_calculator::teams_
private

Definition at line 214 of file pathfind.hpp.

Referenced by cost().

◆ total_movement_

const int pathfind::shortest_path_calculator::total_movement_
private

Definition at line 217 of file pathfind.hpp.

Referenced by cost().

◆ unit_

const unit& pathfind::shortest_path_calculator::unit_
private

Definition at line 212 of file pathfind.hpp.

Referenced by cost().

◆ viewing_team_

const team& pathfind::shortest_path_calculator::viewing_team_
private

Definition at line 213 of file pathfind.hpp.

Referenced by cost().


The documentation for this struct was generated from the following files: