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