31     template <
typename ValueT>
    32     void Push(ValueT &&value) {
    33       std::lock_guard<std::mutex> lock(
_mutex);
    34       auto new_list = std::make_shared<ListT>(*
Load());
    35       new_list->emplace_back(std::forward<ValueT>(value));
    40       std::lock_guard<std::mutex> lock(
_mutex);
    41       auto new_list = std::make_shared<ListT>(*
Load());
    42       auto begin = new_list->begin();
    43       std::advance(begin, index);
    44       new_list->erase(begin);
    48     template <
typename ValueT>
    50       std::lock_guard<std::mutex> lock(
_mutex);
    51       auto new_list = std::make_shared<ListT>(*
Load());
    52       new_list->erase(std::remove(new_list->begin(), new_list->end(), value), new_list->end());
    57       std::lock_guard<std::mutex> lock(
_mutex);
    58       _list = std::make_shared<ListT>();
    62     std::shared_ptr<const ListT> 
Load()
 const {
 std::shared_ptr< T > load() const noexcept
 
Holds an atomic pointer to a list. 
 
std::vector< carla::client::detail::CallbackList::Item > ListT
 
This file contains definitions of common data structures used in traffic manager. ...
 
void DeleteByIndex(size_t index)
 
std::shared_ptr< const ListT > Load() const
Returns a pointer to the list. 
 
void DeleteByValue(const ValueT &value)
 
Inherit (privately) to suppress copy/move construction and assignment. 
 
void Push(ValueT &&value)
 
AtomicSharedPtr< const ListT > _list