18 const std::vector<rpc::ActorDefinition> &blueprints) {
20 for (
auto &definition : blueprints) {
26 const std::string &wildcard_pattern)
const {
29 if (pair.second.MatchTags(wildcard_pattern)) {
37 const std::string &name,
const std::string& value)
const {
41 if (!pair.second.ContainsAttribute(name))
47 const std::string &AttributeValue = Attribute.
GetValue();
48 if (value == AttributeValue)
53 for (
const std::string &Value : Values)
69 return it !=
_blueprints.end() ? &it->second :
nullptr;
76 throw_exception(std::out_of_range(
"blueprint '"s + key +
"' not found"));
map_type::size_type size_type
std::unordered_map< std::string, ActorBlueprint > map_type
const std::vector< std::string > & GetRecommendedValues() const
SharedPtr< BlueprintLibrary > Filter(const std::string &wildcard_pattern) const
Filters a list of ActorBlueprint with id or tags matching wildcard_pattern.
void throw_exception(const std::exception &e)
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
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
virtual const std::string & GetValue() const override
const_reference at(const std::string &key) const
An attribute of an ActorBlueprint.
const value_type * const_pointer
Contains all the necessary information for spawning an Actor.
BlueprintLibrary(const std::vector< rpc::ActorDefinition > &blueprints)
const_reference operator[](size_type pos) const
SharedPtr< BlueprintLibrary > FilterByAttribute(const std::string &name, const std::string &value) const