16#include <unordered_map>
27 using map_type = std::unordered_map<std::string, ActorBlueprint>;
34 using const_iterator =
decltype(carla::iterator::make_map_values_const_iterator<map_type::const_iterator>(map_type::const_iterator{}));
38 explicit BlueprintLibrary(
const std::vector<rpc::ActorDefinition> &blueprints);
55 using diff_t = std::iterator_traits<const_iterator>::difference_type;
56 return std::next(
_blueprints.begin(),
static_cast<diff_t
>(pos))->second;
Inherit (privately) to suppress copy construction and assignment.
const_iterator end() const
map_type::key_type key_type
SharedPtr< BlueprintLibrary > FilterByAttribute(const std::string &name, const std::string &value) const
std::unordered_map< std::string, ActorBlueprint > map_type
BlueprintLibrary(BlueprintLibrary &&)=default
map_type::mapped_type value_type
const value_type * const_pointer
decltype(carla::iterator::make_map_values_const_iterator< map_type::const_iterator >(map_type::const_iterator{})) const_iterator
const_iterator begin() const
BlueprintLibrary & operator=(BlueprintLibrary &&)=default
const value_type & const_reference
BlueprintLibrary(const std::vector< rpc::ActorDefinition > &blueprints)
map_type::size_type size_type
BlueprintLibrary(map_type blueprints)
const_pointer Find(const std::string &key) const
SharedPtr< BlueprintLibrary > Filter(const std::string &wildcard_pattern) const
Filters a list of ActorBlueprint with id or tags matching wildcard_pattern.
const_reference at(const std::string &key) const
const_reference operator[](size_type pos) const
static auto make_map_values_const_iterator(It it)
Creates an iterator over const references to the values of a map.
This file contains definitions of common data structures used in traffic manager.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...