71 std::size_t
find_index(
const std::string & unit_id)
const;
This class encapsulates the recall list of a team.
std::size_t size() const
Get the number of units on the list.
unit_ptr extract_if_matches_id(const std::string &unit_id, int *pos=nullptr)
Find a unit by id, and extract from this object if found.
bool empty() const
Is it empty?
unit_ptr find_if_matches_underlying_id(std::size_t uid)
Find a unit by underlying id.
std::vector< unit_ptr >::const_iterator const_iterator
const_iterator end() const
end const iterator
std::vector< unit_ptr >::iterator iterator
unit_ptr operator[](std::size_t index)
vector style dereference
void add(const unit_ptr &ptr, int pos=-1)
Add a unit to the list.
std::vector< unit_ptr > recall_list_
The underlying data struture.
unit_ptr find_if_matches_id(const std::string &unit_id)
Find a unit by id.
iterator erase_index(std::size_t index)
Erase by index.
unit_const_ptr operator[](std::size_t index) const
vector style dereference
iterator end()
end iterator
iterator erase(const iterator &it)
Erase an iterator to this object.
std::size_t find_index(const std::string &unit_id) const
Find the index of a unit by its id.
void erase_by_underlying_id(std::size_t uid)
Erase any unit with this underlying id.
iterator begin()
begin iterator
void erase_if_matches_id(const std::string &unit_id)
Erase any unit with this id.
const_iterator begin() const
begin const iterator
unit_ptr extract_if_matches_underlying_id(std::size_t uid)
Find a unit by underlying id, and extract if found.
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
std::string::const_iterator iterator
std::shared_ptr< const unit > unit_const_ptr
std::shared_ptr< unit > unit_ptr