The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Private Attributes | List of all members
actions::move_unit_spectator Class Reference

#include <move.hpp>

Public Member Functions

void add_seen_friend (const unit_map::const_iterator &u)
 add a location of a seen friend More...
 
void add_seen_enemy (const unit_map::const_iterator &u)
 add the location of new seen enemy More...
 
const unit_map::const_iteratorget_ambusher () const
 get the location of an ambusher More...
 
const unit_map::const_iteratorget_failed_teleport () const
 get the location of a failed teleport More...
 
const std::vector< unit_map::const_iterator > & get_seen_enemies () const
 get the locations of seen enemies More...
 
const std::vector< unit_map::const_iterator > & get_seen_friends () const
 get the locations of seen friends More...
 
const unit_map::const_iteratorget_unit () const
 get new location of moved unit More...
 
 move_unit_spectator (const unit_map &units)
 constructor More...
 
virtual ~move_unit_spectator ()
 destructor More...
 
void reset (const unit_map &units)
 reset all locations to empty values More...
 
void set_ambusher (const unit_map::const_iterator &u)
 set the location of an ambusher More...
 
void set_failed_teleport (const unit_map::const_iterator &u)
 set the location of a failed teleport More...
 
void set_unit (const unit_map::const_iterator &u)
 set the iterator to moved unit More...
 

Private Attributes

unit_map::const_iterator ambusher_
 
unit_map::const_iterator failed_teleport_
 
std::vector< unit_map::const_iteratorseen_enemies_
 
std::vector< unit_map::const_iteratorseen_friends_
 
unit_map::const_iterator unit_
 

Detailed Description

Definition at line 35 of file move.hpp.

Constructor & Destructor Documentation

◆ move_unit_spectator()

actions::move_unit_spectator::move_unit_spectator ( const unit_map units)

constructor

Definition at line 101 of file move.cpp.

◆ ~move_unit_spectator()

actions::move_unit_spectator::~move_unit_spectator ( )
virtual

destructor

Definition at line 107 of file move.cpp.

Member Function Documentation

◆ add_seen_enemy()

void actions::move_unit_spectator::add_seen_enemy ( const unit_map::const_iterator u)

add the location of new seen enemy

Definition at line 65 of file move.cpp.

References seen_enemies_.

Referenced by actions::shroud_clearer::clear_loc().

◆ add_seen_friend()

void actions::move_unit_spectator::add_seen_friend ( const unit_map::const_iterator u)

add a location of a seen friend

Definition at line 59 of file move.cpp.

References seen_friends_.

Referenced by actions::shroud_clearer::clear_loc().

◆ get_ambusher()

const unit_map::const_iterator & actions::move_unit_spectator::get_ambusher ( ) const

get the location of an ambusher

Definition at line 71 of file move.cpp.

References ambusher_.

Referenced by ai::move_result::do_execute().

◆ get_failed_teleport()

const unit_map::const_iterator & actions::move_unit_spectator::get_failed_teleport ( ) const

get the location of a failed teleport

Definition at line 77 of file move.cpp.

References failed_teleport_.

Referenced by ai::move_result::do_execute().

◆ get_seen_enemies()

const std::vector< unit_map::const_iterator > & actions::move_unit_spectator::get_seen_enemies ( ) const

get the locations of seen enemies

Definition at line 83 of file move.cpp.

References seen_enemies_.

◆ get_seen_friends()

const std::vector< unit_map::const_iterator > & actions::move_unit_spectator::get_seen_friends ( ) const

get the locations of seen friends

Definition at line 89 of file move.cpp.

References seen_friends_.

◆ get_unit()

const unit_map::const_iterator & actions::move_unit_spectator::get_unit ( ) const

get new location of moved unit

Definition at line 95 of file move.cpp.

References unit_.

Referenced by ai::move_result::do_execute().

◆ reset()

void actions::move_unit_spectator::reset ( const unit_map units)

reset all locations to empty values

Definition at line 111 of file move.cpp.

References ambusher_, unit_map::end(), failed_teleport_, seen_enemies_, seen_friends_, and unit_.

◆ set_ambusher()

void actions::move_unit_spectator::set_ambusher ( const unit_map::const_iterator u)

set the location of an ambusher

Definition at line 121 of file move.cpp.

References ambusher_.

◆ set_failed_teleport()

void actions::move_unit_spectator::set_failed_teleport ( const unit_map::const_iterator u)

set the location of a failed teleport

Definition at line 127 of file move.cpp.

References failed_teleport_.

◆ set_unit()

void actions::move_unit_spectator::set_unit ( const unit_map::const_iterator u)

set the iterator to moved unit

Definition at line 133 of file move.cpp.

References unit_.

Referenced by ai::move_result::do_execute().

Member Data Documentation

◆ ambusher_

unit_map::const_iterator actions::move_unit_spectator::ambusher_
private

Definition at line 87 of file move.hpp.

Referenced by get_ambusher(), reset(), and set_ambusher().

◆ failed_teleport_

unit_map::const_iterator actions::move_unit_spectator::failed_teleport_
private

Definition at line 88 of file move.hpp.

Referenced by get_failed_teleport(), reset(), and set_failed_teleport().

◆ seen_enemies_

std::vector<unit_map::const_iterator> actions::move_unit_spectator::seen_enemies_
private

Definition at line 89 of file move.hpp.

Referenced by add_seen_enemy(), get_seen_enemies(), and reset().

◆ seen_friends_

std::vector<unit_map::const_iterator> actions::move_unit_spectator::seen_friends_
private

Definition at line 90 of file move.hpp.

Referenced by add_seen_friend(), get_seen_friends(), and reset().

◆ unit_

unit_map::const_iterator actions::move_unit_spectator::unit_
private

Definition at line 91 of file move.hpp.

Referenced by get_unit(), reset(), and set_unit().


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