#include <map.hpp>
Public Types | |
typedef std::forward_iterator_tag | iterator_category |
typedef int | difference_type |
typedef iter_types::value_type | value_type |
typedef std::shared_ptr< value_type > | pointer |
typedef value_type & | reference |
typedef iter_types::container_type | container_type |
typedef iter_types::iterator_type | iterator_type |
Public Member Functions | |
~iterator_base () | |
iterator_base () | |
iterator_base (iterator_type i, container_type *m) | |
iterator_base (const iterator_base &that) | |
iterator_base & | operator= (const iterator_base &that) |
operator iterator_base< const_iter_types > () const | |
pointer | operator-> () const |
pointer | get_shared_ptr () const |
This is exactly the same as operator-> but it's slightly more readable, and can replace &*iter syntax easily. More... | |
reference | operator* () const |
iterator_base & | operator++ () |
iterator_base | operator++ (int) |
iterator_base & | operator-- () |
iterator_base | operator-- (int) |
bool | valid () const |
operator bool () const | |
bool | operator== (const iterator_base &rhs) const |
bool | operator!= (const iterator_base &rhs) const |
Private Member Functions | |
iterator_base (lmap::iterator ui, container_type *m) | |
Constructs an iterator from the location map. More... | |
bool | valid_for_dereference () const |
bool | valid_entry () const |
void | valid_exit () const |
bool | valid_ref_count () const |
void | inc () |
Increment the reference counter. More... | |
void | dec () |
Decrement the reference counter Delete the umap entry if the unit is gone and the reference counter is zero. More... | |
unit_map::umap & | the_map () const |
Private Attributes | |
iterator_type | i_ |
local iterator More... | |
container_type * | tank_ |
the unit_map for i_ More... | |
Friends | |
template<typename Y > | |
struct | iterator_base |
class | unit_map |
typedef iter_types::container_type unit_map::iterator_base< iter_types >::container_type |
typedef int unit_map::iterator_base< iter_types >::difference_type |
typedef std::forward_iterator_tag unit_map::iterator_base< iter_types >::iterator_category |
typedef iter_types::iterator_type unit_map::iterator_base< iter_types >::iterator_type |
typedef std::shared_ptr<value_type> unit_map::iterator_base< iter_types >::pointer |
typedef value_type& unit_map::iterator_base< iter_types >::reference |
typedef iter_types::value_type unit_map::iterator_base< iter_types >::value_type |
|
inline |
Definition at line 150 of file map.hpp.
References unit_map::iterator_base< iter_types >::dec().
|
inline |
|
inline |
Definition at line 161 of file map.hpp.
References unit_map::iterator_base< iter_types >::inc(), and unit_map::iterator_base< iter_types >::valid_exit().
|
inline |
Definition at line 169 of file map.hpp.
References unit_map::iterator_base< iter_types >::inc(), and unit_map::iterator_base< iter_types >::valid_exit().
|
inlineprivate |
Constructs an iterator from the location map.
Definition at line 197 of file map.hpp.
References unit_map::iterator_base< iter_types >::inc(), and unit_map::iterator_base< iter_types >::valid_exit().
|
inlineprivate |
Decrement the reference counter Delete the umap entry if the unit is gone and the reference counter is zero.
Definition at line 333 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::valid_ref_count().
Referenced by unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), unit_map::iterator_base< iter_types >::operator=(), and unit_map::iterator_base< iter_types >::~iterator_base().
|
inline |
This is exactly the same as operator-> but it's slightly more readable, and can replace &*iter syntax easily.
Definition at line 217 of file map.hpp.
References unit_map::iterator_base< iter_types >::operator->().
Referenced by battle_context::battle_context(), gui2::dialogs::unit_attack::damage_calc_callback(), lua_unit::get(), gui2::dialogs::game_stats::get_leader(), actions::get_recalls(), lua_unit::get_shared(), game_events::entity_location::get_unit(), wb::move::get_unit(), wb::suppose_dead::get_unit(), display_context::get_visible_unit_shared_ptr(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), game_lua_kernel::intf_find_vision_range(), game_lua_kernel::intf_teleport(), events::mouse_handler::mouse_motion(), gui2::dialogs::unit_attack::pre_show(), wb::highlighter::set_mouseover_hex(), attack_type::special_active_impl(), events::mouse_handler::touch_motion(), actions::undo::move_action::undo(), actions::undo::recall_action::undo(), unit_display::unit_attack(), and unit_display::unit_recruited().
|
inlineprivate |
Increment the reference counter.
Definition at line 320 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, and unit_map::iterator_base< iter_types >::valid_ref_count().
Referenced by unit_map::iterator_base< iter_types >::iterator_base(), unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), and unit_map::iterator_base< iter_types >::operator=().
|
inlineexplicit |
Definition at line 278 of file map.hpp.
References unit_map::iterator_base< iter_types >::valid().
|
inline |
Definition at line 190 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, and unit_map::iterator_base< iter_types >::tank_.
|
inline |
Definition at line 288 of file map.hpp.
References unit_map::iterator_base< iter_types >::operator==().
|
inline |
Definition at line 222 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::valid().
|
inline |
Definition at line 229 of file map.hpp.
References unit_map::iterator_base< iter_types >::dec(), unit_map::end(), unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::inc(), unit_map::iterator_base< iter_types >::tank_, unit_map::iterator_base< iter_types >::the_map(), unit_map::iterator_base< iter_types >::valid_entry(), and unit_map::iterator_base< iter_types >::valid_exit().
Referenced by unit_map::iterator_base< iter_types >::operator++().
|
inline |
Definition at line 244 of file map.hpp.
References unit_map::iterator_base< iter_types >::operator++().
|
inline |
Definition at line 251 of file map.hpp.
References unit_map::begin(), unit_map::iterator_base< iter_types >::dec(), unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::inc(), unit_map::iterator_base< iter_types >::tank_, unit_map::iterator_base< iter_types >::the_map(), and unit_map::iterator_base< iter_types >::valid_exit().
Referenced by unit_map::iterator_base< iter_types >::operator--().
|
inline |
Definition at line 266 of file map.hpp.
References unit_map::iterator_base< iter_types >::operator--().
|
inline |
Definition at line 206 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::valid().
Referenced by unit_map::iterator_base< iter_types >::get_shared_ptr().
|
inline |
|
inline |
Definition at line 283 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, and unit_map::iterator_base< iter_types >::tank_.
Referenced by unit_map::iterator_base< iter_types >::operator!=().
|
inlineprivate |
Definition at line 344 of file map.hpp.
References unit_map::iterator_base< iter_types >::tank_.
Referenced by unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), unit_map::iterator_base< iter_types >::valid_entry(), unit_map::iterator_base< iter_types >::valid_exit(), unit_map::iterator_base< iter_types >::valid_for_dereference(), and unit_map::iterator_base< iter_types >::valid_ref_count().
|
inline |
Definition at line 273 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, and unit_map::iterator_base< iter_types >::valid_for_dereference().
Referenced by replay::add_unit_checksum(), advance_unit(), BOOST_AUTO_TEST_CASE(), playsingle_controller::hotkey_handler::can_execute_command(), play_controller::hotkey_handler::can_execute_command(), actions::shroud_clearer::clear_loc(), events::mouse_handler::current_unit_attacks_from(), ai::move_result::do_execute(), do_replay_handle(), ai::ai_default_rca::combat_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::execute(), wb::attack::execute(), unit_creator::find_location(), events::mouse_handler::find_unit(), events::mouse_handler::find_unit_nonowning(), game_board::find_visible_unit(), lua_unit::get(), lua_unit::get_shared(), wb::move::get_unit(), wb::suppose_dead::get_unit(), display_context::get_visible_unit(), display_context::get_visible_unit_shared_ptr(), game_board::has_visible_unit(), ai::helper_check_village(), events::mouse_handler::hex_hosts_unit(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), game_lua_kernel::intf_find_vision_range(), game_lua_kernel::intf_get_displayed_unit(), game_lua_kernel::intf_get_unit(), terrain_filter::match_internal(), game_events::entity_location::matches_unit(), game_events::entity_location::matches_unit_filter(), events::mouse_handler::mouse_motion(), unit_map::iterator_base< iter_types >::operator bool(), unit_map::iterator_base< iter_types >::operator*(), unit_map::iterator_base< iter_types >::operator->(), actions::place_recruit(), wb::manager::post_draw(), wb::manager::pre_draw(), play_controller::process_keyup_event(), game_display::scroll_to_leader(), game_board::side_change_controller(), game_board::side_drop_to(), attack_type::special_active_impl(), SYNCED_COMMAND_HANDLER_FUNCTION(), game_board::team_is_defeated(), events::mouse_handler::touch_motion(), unit_display::unit_attack(), pathfind::vision_path::vision_path(), unit_helper::will_certainly_advance(), and display_context::would_be_discovered().
|
inlineprivate |
Definition at line 302 of file map.hpp.
References unit_map::end(), unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::the_map().
Referenced by unit_map::iterator_base< iter_types >::operator++().
|
inlineprivate |
Definition at line 307 of file map.hpp.
References unit_map::end(), unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::the_map().
Referenced by unit_map::iterator_base< iter_types >::iterator_base(), unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), and unit_map::iterator_base< iter_types >::operator=().
|
inlineprivate |
Definition at line 297 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::the_map().
Referenced by unit_map::iterator_base< iter_types >::valid().
|
inlineprivate |
Definition at line 314 of file map.hpp.
References unit_map::iterator_base< iter_types >::i_, unit_map::iterator_base< iter_types >::tank_, and unit_map::iterator_base< iter_types >::the_map().
Referenced by unit_map::iterator_base< iter_types >::dec(), and unit_map::iterator_base< iter_types >::inc().
|
private |
local iterator
Definition at line 352 of file map.hpp.
Referenced by unit_map::iterator_base< iter_types >::dec(), unit_map::iterator_base< iter_types >::inc(), unit_map::iterator_base< iter_types >::operator iterator_base< const_iter_types >(), unit_map::iterator_base< iter_types >::operator*(), unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), unit_map::iterator_base< iter_types >::operator->(), unit_map::iterator_base< iter_types >::operator=(), unit_map::iterator_base< iter_types >::operator==(), unit_map::iterator_base< iter_types >::valid(), unit_map::iterator_base< iter_types >::valid_entry(), unit_map::iterator_base< iter_types >::valid_exit(), unit_map::iterator_base< iter_types >::valid_for_dereference(), and unit_map::iterator_base< iter_types >::valid_ref_count().
|
private |
the unit_map for i_
Definition at line 354 of file map.hpp.
Referenced by unit_map::iterator_base< iter_types >::dec(), unit_map::iterator_base< iter_types >::operator iterator_base< const_iter_types >(), unit_map::iterator_base< iter_types >::operator*(), unit_map::iterator_base< iter_types >::operator++(), unit_map::iterator_base< iter_types >::operator--(), unit_map::iterator_base< iter_types >::operator->(), unit_map::iterator_base< iter_types >::operator=(), unit_map::iterator_base< iter_types >::operator==(), unit_map::iterator_base< iter_types >::the_map(), unit_map::iterator_base< iter_types >::valid_entry(), unit_map::iterator_base< iter_types >::valid_exit(), unit_map::iterator_base< iter_types >::valid_for_dereference(), and unit_map::iterator_base< iter_types >::valid_ref_count().