The Battle for Wesnoth  1.15.1+dev
Public Types | Public Member Functions | Private Attributes | List of all members
unit_ability_list Class Reference

#include <unit.hpp>

Public Types

typedef std::vector< unit_ability >::iterator iterator
 
typedef std::vector< unit_ability >::const_iterator const_iterator
 

Public Member Functions

 unit_ability_list (const map_location &loc=map_location())
 
std::pair< int, map_locationhighest (const std::string &key, int def=0) const
 
std::pair< int, map_locationlowest (const std::string &key, int def=0) const
 
template<typename TComp >
std::pair< int, map_locationget_extremum (const std::string &key, int def, const TComp &comp) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bool empty () const
 
unit_abilityfront ()
 
const unit_abilityfront () const
 
unit_abilityback ()
 
const unit_abilityback () const
 
iterator erase (const iterator &erase_it)
 
template<typename... T>
void emplace_back (T &&... args)
 
const map_locationloc () const
 

Private Attributes

std::vector< unit_abilitycfgs_
 
map_location loc_
 

Detailed Description

Definition at line 50 of file unit.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 70 of file unit.hpp.

◆ iterator

Definition at line 69 of file unit.hpp.

Constructor & Destructor Documentation

◆ unit_ability_list()

unit_ability_list::unit_ability_list ( const map_location loc = map_location())
inline

Definition at line 53 of file unit.hpp.

Member Function Documentation

◆ back() [1/2]

unit_ability& unit_ability_list::back ( )
inline

Definition at line 81 of file unit.hpp.

◆ back() [2/2]

const unit_ability& unit_ability_list::back ( ) const
inline

Definition at line 82 of file unit.hpp.

◆ begin() [1/2]

iterator unit_ability_list::begin ( )
inline

◆ begin() [2/2]

const_iterator unit_ability_list::begin ( ) const
inline

Definition at line 73 of file unit.hpp.

◆ emplace_back()

template<typename... T>
void unit_ability_list::emplace_back ( T &&...  args)
inline

◆ empty()

bool unit_ability_list::empty ( ) const
inline

◆ end() [1/2]

iterator unit_ability_list::end ( )
inline

◆ end() [2/2]

const_iterator unit_ability_list::end ( ) const
inline

Definition at line 75 of file unit.hpp.

◆ erase()

iterator unit_ability_list::erase ( const iterator erase_it)
inline

Definition at line 84 of file unit.hpp.

Referenced by ability_leadership(), bool_leadership(), and unit::resistance_against().

◆ front() [1/2]

unit_ability& unit_ability_list::front ( )
inline

Definition at line 79 of file unit.hpp.

Referenced by battle_context_unit_stats::battle_context_unit_stats().

◆ front() [2/2]

const unit_ability& unit_ability_list::front ( ) const
inline

Definition at line 80 of file unit.hpp.

◆ get_extremum()

template<typename TComp >
std::pair< int, map_location > unit_ability_list::get_extremum ( const std::string &  key,
int  def,
const TComp &  comp 
) const

◆ highest()

std::pair<int, map_location> unit_ability_list::highest ( const std::string &  key,
int  def = 0 
) const
inline

◆ loc()

const map_location& unit_ability_list::loc ( ) const
inline

Definition at line 89 of file unit.hpp.

References loc_.

◆ lowest()

std::pair<int, map_location> unit_ability_list::lowest ( const std::string &  key,
int  def = 0 
) const
inline

Definition at line 60 of file unit.hpp.

Referenced by tod_manager::get_illuminated_time_of_day().

Member Data Documentation

◆ cfgs_

std::vector<unit_ability> unit_ability_list::cfgs_
private

Definition at line 92 of file unit.hpp.

◆ loc_

map_location unit_ability_list::loc_
private

Definition at line 93 of file unit.hpp.


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