Freeciv21
Develop your civilization from humble roots to a global empire
PFPath Class Reference

#include <path_finding.h>

+ Collaboration diagram for PFPath:

Public Member Functions

 PFPath ()=default
 
 PFPath (int size)
 MEMBER FUNCTIONS FOR THE CLASS Pf_Class. More...
 
 PFPath (const PFPath &obj)=default
 
 PFPath (PFPath &&obj)=default
 
 PFPath (const struct pf_parameter *param)
 Create a path with start tile of a parameter. More...
 
int length () const
 
virtual ~PFPath ()
 
bool empty () const
 
bool advance (struct tile *ptile)
 Remove the part of a path leading up to a given tile. More...
 
pf_positionoperator[] (int i)
 
const pf_positionoperator[] (int i) const
 
PFPathoperator= (PFPath &&other)=default
 

Private Attributes

std::vector< pf_positionpositions
 

Detailed Description

Definition at line 312 of file path_finding.h.

Constructor & Destructor Documentation

◆ PFPath() [1/5]

PFPath::PFPath ( )
default

◆ PFPath() [2/5]

PFPath::PFPath ( int  size)

MEMBER FUNCTIONS FOR THE CLASS Pf_Class.

Definition at line 3243 of file path_finding.cpp.

◆ PFPath() [3/5]

PFPath::PFPath ( const PFPath obj)
default

◆ PFPath() [4/5]

PFPath::PFPath ( PFPath &&  obj)
default

◆ PFPath() [5/5]

PFPath::PFPath ( const struct pf_parameter param)

Create a path with start tile of a parameter.

Definition at line 3247 of file path_finding.cpp.

◆ ~PFPath()

PFPath::~PFPath ( )
virtual

Definition at line 3254 of file path_finding.cpp.

Member Function Documentation

◆ advance()

bool PFPath::advance ( struct tile ptile)

Remove the part of a path leading up to a given tile.

If given tile is on the path more than once then the first occurrence will be the one used. If tile is not on the path at all, returns FALSE and path is not changed at all.

Definition at line 3266 of file path_finding.cpp.

◆ empty()

◆ length()

◆ operator=()

PFPath& PFPath::operator= ( PFPath &&  other)
default

◆ operator[]() [1/2]

pf_position & PFPath::operator[] ( int  i)

Definition at line 3285 of file path_finding.cpp.

◆ operator[]() [2/2]

const pf_position & PFPath::operator[] ( int  i) const

Definition at line 3296 of file path_finding.cpp.

Member Data Documentation

◆ positions

std::vector<pf_position> PFPath::positions
private

Definition at line 313 of file path_finding.h.

Referenced by advance(), empty(), length(), operator[](), PFPath(), and ~PFPath().