#include <BlueprintLibrary.h>
Public Types | |
using | const_iterator = decltype(carla::iterator::make_map_values_const_iterator< map_type::const_iterator >(map_type::const_iterator{})) |
using | const_pointer = const value_type * |
using | const_reference = const value_type & |
using | key_type = map_type::key_type |
using | size_type = map_type::size_type |
using | value_type = map_type::mapped_type |
Public Member Functions | |
const_reference | at (const std::string &key) const |
const_reference | at (size_type pos) const |
const_iterator | begin () const |
BlueprintLibrary (const std::vector< rpc::ActorDefinition > &blueprints) | |
BlueprintLibrary (BlueprintLibrary &&)=default | |
bool | empty () const |
const_iterator | end () const |
SharedPtr< BlueprintLibrary > | Filter (const std::string &wildcard_pattern) const |
Filters a list of ActorBlueprint with id or tags matching wildcard_pattern. More... | |
SharedPtr< BlueprintLibrary > | FilterByAttribute (const std::string &name, const std::string &value) const |
const_pointer | Find (const std::string &key) const |
BlueprintLibrary & | operator= (BlueprintLibrary &&)=default |
const_reference | operator[] (size_type pos) const |
size_type | size () const |
Private Types | |
using | map_type = std::unordered_map< std::string, ActorBlueprint > |
Private Member Functions | |
BlueprintLibrary (map_type blueprints) | |
Private Member Functions inherited from carla::MovableNonCopyable | |
MovableNonCopyable ()=default | |
MovableNonCopyable (const MovableNonCopyable &)=delete | |
MovableNonCopyable (MovableNonCopyable &&)=default | |
MovableNonCopyable & | operator= (const MovableNonCopyable &)=delete |
MovableNonCopyable & | operator= (MovableNonCopyable &&)=default |
Private Attributes | |
map_type | _blueprints |
We should assess the use cases and reconsider this implementation.
Definition at line 24 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::const_iterator = decltype(carla::iterator::make_map_values_const_iterator<map_type::const_iterator>(map_type::const_iterator{})) |
Definition at line 34 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::const_pointer = const value_type * |
Definition at line 36 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::const_reference = const value_type & |
Definition at line 35 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::key_type = map_type::key_type |
Definition at line 31 of file BlueprintLibrary.h.
|
private |
Definition at line 27 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::size_type = map_type::size_type |
Definition at line 33 of file BlueprintLibrary.h.
using carla::client::BlueprintLibrary::value_type = map_type::mapped_type |
Definition at line 32 of file BlueprintLibrary.h.
|
explicit |
Definition at line 17 of file BlueprintLibrary.cpp.
References _blueprints.
Referenced by Filter(), and FilterByAttribute().
|
default |
|
inlineprivate |
Definition at line 81 of file BlueprintLibrary.h.
BlueprintLibrary::const_reference carla::client::BlueprintLibrary::at | ( | const std::string & | key | ) | const |
std::out_of_range | if no such element exists. |
Definition at line 72 of file BlueprintLibrary.cpp.
References _blueprints, and carla::throw_exception().
Referenced by operator[]().
BlueprintLibrary::const_reference carla::client::BlueprintLibrary::at | ( | size_type | pos | ) | const |
std::out_of_range | if !(pos < size()). |
Definition at line 81 of file BlueprintLibrary.cpp.
References operator[](), size(), and carla::throw_exception().
|
inline |
Definition at line 63 of file BlueprintLibrary.h.
References _blueprints, and carla::iterator::make_map_values_const_iterator().
|
inline |
Definition at line 71 of file BlueprintLibrary.h.
References _blueprints.
|
inline |
Definition at line 67 of file BlueprintLibrary.h.
References _blueprints, and carla::iterator::make_map_values_const_iterator().
SharedPtr< BlueprintLibrary > carla::client::BlueprintLibrary::Filter | ( | const std::string & | wildcard_pattern | ) | const |
Filters a list of ActorBlueprint with id or tags matching wildcard_pattern.
Definition at line 25 of file BlueprintLibrary.cpp.
References _blueprints, and BlueprintLibrary().
SharedPtr< BlueprintLibrary > carla::client::BlueprintLibrary::FilterByAttribute | ( | const std::string & | name, |
const std::string & | value | ||
) | const |
Definition at line 36 of file BlueprintLibrary.cpp.
References _blueprints, BlueprintLibrary(), carla::client::ActorAttribute::GetRecommendedValues(), and carla::client::ActorAttribute::GetValue().
BlueprintLibrary::const_pointer carla::client::BlueprintLibrary::Find | ( | const std::string & | key | ) | const |
Definition at line 67 of file BlueprintLibrary.cpp.
References _blueprints.
|
default |
|
inline |
Definition at line 54 of file BlueprintLibrary.h.
References _blueprints, and at().
Referenced by at().
|
inline |
Definition at line 75 of file BlueprintLibrary.h.
References _blueprints.
Referenced by at().
|
private |
Definition at line 84 of file BlueprintLibrary.h.
Referenced by at(), begin(), BlueprintLibrary(), empty(), end(), Filter(), FilterByAttribute(), Find(), operator[](), and size().