包含生成参与者所需的所有必要信息。 更多...
#include <ActorBlueprint.h>
Public 成员函数 | |
构造函数 | |
ActorBlueprint (rpc::ActorDefinition actor_definition) | |
Id | |
const std::string & | GetId () const |
标签 | |
bool | ContainsTag (const std::string &tag) const |
bool | MatchTags (const std::string &wildcard_pattern) const |
测试是否有标签满足 wildcard_pattern。 | |
std::vector< std::string > | GetTags () const |
属性 | |
bool | ContainsAttribute (const std::string &id) const |
const ActorAttribute & | GetAttribute (const std::string &id) const |
void | SetAttribute (const std::string &id, std::string value) |
Set the value of the attribute given by id. | |
size_t | size () const |
auto | begin () const |
auto | end () const |
参与者描述 ActorDescription | |
rpc::ActorDescription | MakeActorDescription () const |
Private 属性 | |
std::unordered_map< std::string, ActorAttribute > | _attributes |
std::string | _id |
std::unordered_set< std::string > | _tags |
uint32_t | _uid = 0u |
包含生成参与者所需的所有必要信息。
在文件 ActorBlueprint.h 第 23 行定义.
|
explicit |
|
inline |
在文件 ActorBlueprint.h 第 92 行定义.
引用了 _attributes , 以及 carla::iterator::make_map_values_const_iterator().
|
inline |
在文件 ActorBlueprint.h 第 74 行定义.
引用了 _attributes.
|
inline |
在文件 ActorBlueprint.h 第 53 行定义.
引用了 _tags.
|
inline |
在文件 ActorBlueprint.h 第 96 行定义.
引用了 _attributes , 以及 carla::iterator::make_map_values_const_iterator().
const ActorAttribute & carla::client::ActorBlueprint::GetAttribute | ( | const std::string & | id | ) | const |
如果不存在这种元素,则抛出 | std::out_of_range 异常。 |
在文件 ActorBlueprint.cpp 第 68 行定义.
引用了 _attributes , 以及 carla::throw_exception().
被这些函数引用 SetAttribute().
|
inline |
在文件 ActorBlueprint.h 第 41 行定义.
引用了 _id.
|
inline |
在文件 ActorBlueprint.h 第 62 行定义.
引用了 _tags.
rpc::ActorDescription carla::client::ActorBlueprint::MakeActorDescription | ( | ) | const |
在文件 ActorBlueprint.cpp 第 91 行定义.
引用了 _attributes, _id, _uid, carla::rpc::ActorDescription::attributes, carla::rpc::ActorDescription::id , 以及 carla::rpc::ActorDescription::uid.
被这些函数引用 carla::client::detail::Simulator::SpawnActor().
bool carla::client::ActorBlueprint::MatchTags | ( | const std::string & | wildcard_pattern | ) | const |
测试是否有标签满足 wildcard_pattern。
wildcard_pattern 遵循 Unix shell 风格的通配符。
在文件 ActorBlueprint.cpp 第 50 行定义.
引用了 _id, _tags , 以及 carla::StringUtil::Match().
void carla::client::ActorBlueprint::SetAttribute | ( | const std::string & | id, |
std::string | value ) |
Set the value of the attribute given by id.
如果不存在这样的元素,则抛出 | std::out_of_range 异常。 |
如果属性不可修改,则抛出 | InvalidAttributeValue 异常。 |
如果格式不匹配属性类型,则抛出 | InvalidAttributeValue 异常。 |
在文件 ActorBlueprint.cpp 第 83 行定义.
引用了 GetAttribute().
|
inline |
在文件 ActorBlueprint.h 第 88 行定义.
引用了 _attributes.
|
private |
在文件 ActorBlueprint.h 第 120 行定义.
被这些函数引用 ActorBlueprint(), begin(), ContainsAttribute(), end(), GetAttribute(), MakeActorDescription() , 以及 size().
|
private |
在文件 ActorBlueprint.h 第 116 行定义.
被这些函数引用 GetId(), MakeActorDescription() , 以及 MatchTags().
|
private |
在文件 ActorBlueprint.h 第 118 行定义.
被这些函数引用 ActorBlueprint(), ContainsTag(), GetTags() , 以及 MatchTags().
|
private |
在文件 ActorBlueprint.h 第 114 行定义.
被这些函数引用 MakeActorDescription().