Public Member Functions | |
| selection_mask (const gamemap_base &map) | |
| bool | select (const map_location &loc) |
| Marks loc as selected. More... | |
| bool | deselect (const map_location &loc) |
| Marks loc as unselected. More... | |
| bool | selected (const map_location &loc) const |
| void | select_all () |
| void | deselect_all () |
| void | invert () |
| selection_mask | inverted () const |
| const boost::dynamic_bitset< uint64_t > & | mask () const |
| Read-only access to the underlying bitset. More... | |
Static Public Member Functions | |
| static std::set< map_location > | get_locations (const selection_mask &mask) |
Private Member Functions | |
| std::size_t | get_index (const map_location &loc) const |
| Indexes loc to its corresponding bitflag using row-major ordering. More... | |
| map_location | get_location (std::size_t i) const |
| Gets the corresponding map_location for bit index i. More... | |
Private Attributes | |
| boost::dynamic_bitset< uint64_t > | bitset_ |
| int | stride_ {0} |
| int | height_ {0} |
Definition at line 214 of file editor_map.hpp.
|
inlineexplicit |
Definition at line 217 of file editor_map.hpp.
References bitset_, and gamemap_base::total_area().
|
inline |
Marks loc as unselected.
Definition at line 237 of file editor_map.hpp.
References bitset_, get_index(), and loc.
Referenced by editor::editor_map::remove_from_selection().
|
inline |
Definition at line 252 of file editor_map.hpp.
References bitset_.
Referenced by editor::editor_map::clear_selection().
|
inlineprivate |
Indexes loc to its corresponding bitflag using row-major ordering.
Definition at line 290 of file editor_map.hpp.
References loc, stride_, map_location::wml_x(), and map_location::wml_y().
Referenced by deselect(), select(), and selected().
|
inlineprivate |
Gets the corresponding map_location for bit index i.
Definition at line 296 of file editor_map.hpp.
|
inlinestatic |
Definition at line 269 of file editor_map.hpp.
Referenced by editor::editor_map::selection(), and editor::editor_map::selection_inverse().
|
inline |
Definition at line 257 of file editor_map.hpp.
References bitset_.
Referenced by editor::editor_map::invert_selection(), and inverted().
|
inline |
Definition at line 262 of file editor_map.hpp.
References invert().
Referenced by editor::editor_map::selection_inverse().
|
inline |
Read-only access to the underlying bitset.
Definition at line 283 of file editor_map.hpp.
References bitset_.
Referenced by editor::editor_map::anything_selected(), editor::editor_map::everything_selected(), get_locations(), editor::editor_map::nothing_selected(), and editor::editor_map::num_selected().
|
inline |
Marks loc as selected.
Definition at line 228 of file editor_map.hpp.
References bitset_, get_index(), and loc.
Referenced by editor::editor_map::add_to_selection().
|
inline |
Definition at line 247 of file editor_map.hpp.
References bitset_.
Referenced by editor::editor_map::select_all().
|
inline |
Definition at line 242 of file editor_map.hpp.
References bitset_, get_index(), and loc.
Referenced by editor::editor_map::in_selection().
|
private |
Definition at line 302 of file editor_map.hpp.
Referenced by deselect(), deselect_all(), invert(), mask(), select(), select_all(), selected(), and selection_mask().
|
private |
Definition at line 305 of file editor_map.hpp.
|
private |
Definition at line 304 of file editor_map.hpp.
Referenced by get_index(), and get_location().