CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | Private 属性 | 所有成员列表
carla::client::ActorAttribute类 参考

An attribute of an ActorBlueprint. 更多...

#include <ActorAttribute.h>

+ 类 carla::client::ActorAttribute 继承关系图:
+ carla::client::ActorAttribute 的协作图:

Public 成员函数

 ActorAttribute (ActorAttribute &&)=default
 
 ActorAttribute (ActorAttribute const &)=default
 
 ActorAttribute (rpc::ActorAttribute attribute)
 
virtual const std::string & GetId () const override
 
const std::vector< std::string > & GetRecommendedValues () const
 
virtual rpc::ActorAttributeType GetType () const override
 
virtual const std::string & GetValue () const override
 
bool IsModifiable () const
 
 operator rpc::ActorAttributeValue () const
 Serialize this object as a carla::rpc::ActorAttributeValue.
 
ActorAttributeoperator= (ActorAttribute &&)=default
 
ActorAttributeoperator= (ActorAttribute const &)=default
 
void Set (std::string value)
 Set the value of this attribute.
 
virtual ~ActorAttribute ()=default
 
- Public 成员函数 继承自 carla::client::ActorAttributeValueAccess
 ActorAttributeValueAccess ()=default
 
 ActorAttributeValueAccess (ActorAttributeValueAccess &&)=default
 
 ActorAttributeValueAccess (ActorAttributeValueAccess const &)=default
 
template<>
bool As () const
 
template<>
int As () const
 
template<>
float As () const
 
template<typename T >
As () const
 Cast the value to the given type.
 
template<rpc::ActorAttributeType Type>
auto As () const
 Cast the value to the type specified by the enum carla::rpc::ActorAttributeType.
 
template<>
bool As () const
 
template<>
int As () const
 
template<>
float As () const
 
template<typename T >
bool operator!= (const T &rhs) const
 
ActorAttributeValueAccessoperator= (ActorAttributeValueAccess &&)=default
 
ActorAttributeValueAccessoperator= (ActorAttributeValueAccess const &)=default
 
template<>
bool operator== (const ActorAttribute &rhs) const
 
template<>
bool operator== (const ActorAttributeValue &rhs) const
 
template<>
bool operator== (const ActorAttributeValueAccess &rhs) const
 
template<typename T >
bool operator== (const T &rhs) const
 
virtual ~ActorAttributeValueAccess ()=default
 

Private 属性

rpc::ActorAttribute _attribute
 

额外继承的成员函数

- Protected 成员函数 继承自 carla::client::ActorAttributeValueAccess
void Validate () const
 

详细描述

An attribute of an ActorBlueprint.

在文件 LibCarla/source/carla/client/ActorAttribute.h184 行定义.

构造及析构函数说明

◆ ActorAttribute() [1/3]

carla::client::ActorAttribute::ActorAttribute ( rpc::ActorAttribute attribute)
inline

在文件 LibCarla/source/carla/client/ActorAttribute.h187 行定义.

引用了 carla::client::ActorAttributeValueAccess::Validate().

+ 函数调用图:

◆ ActorAttribute() [2/3]

carla::client::ActorAttribute::ActorAttribute ( ActorAttribute const & )
default

◆ ActorAttribute() [3/3]

carla::client::ActorAttribute::ActorAttribute ( ActorAttribute && )
default

◆ ~ActorAttribute()

virtual carla::client::ActorAttribute::~ActorAttribute ( )
virtualdefault

成员函数说明

◆ GetId()

virtual const std::string & carla::client::ActorAttribute::GetId ( ) const
inlineoverridevirtual

◆ GetRecommendedValues()

const std::vector< std::string > & carla::client::ActorAttribute::GetRecommendedValues ( ) const
inline

在文件 LibCarla/source/carla/client/ActorAttribute.h208 行定义.

引用了 _attribute , 以及 carla::rpc::ActorAttribute::recommended_values.

被这些函数引用 carla::client::BlueprintLibrary::FilterByAttribute().

+ 这是这个函数的调用关系图:

◆ GetType()

virtual rpc::ActorAttributeType carla::client::ActorAttribute::GetType ( ) const
inlineoverridevirtual

实现了 carla::client::ActorAttributeValueAccess.

在文件 LibCarla/source/carla/client/ActorAttribute.h204 行定义.

引用了 _attribute , 以及 carla::rpc::ActorAttribute::type.

被这些函数引用 Set().

+ 这是这个函数的调用关系图:

◆ GetValue()

virtual const std::string & carla::client::ActorAttribute::GetValue ( ) const
inlineoverridevirtual

实现了 carla::client::ActorAttributeValueAccess.

在文件 LibCarla/source/carla/client/ActorAttribute.h227 行定义.

引用了 _attribute , 以及 carla::rpc::ActorAttribute::value.

被这些函数引用 carla::client::BlueprintLibrary::FilterByAttribute().

+ 这是这个函数的调用关系图:

◆ IsModifiable()

bool carla::client::ActorAttribute::IsModifiable ( ) const
inline

◆ operator rpc::ActorAttributeValue()

Serialize this object as a carla::rpc::ActorAttributeValue.

在文件 LibCarla/source/carla/client/ActorAttribute.h223 行定义.

引用了 _attribute.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ Set()

void carla::client::ActorAttribute::Set ( std::string value)

Set the value of this attribute.

异常
InvalidAttributeValueif attribute is not modifiable.
InvalidAttributeValueif format does not match this type.

在文件 ActorAttribute.cpp22 行定义.

引用了 _attribute, carla::rpc::Bool, GetType(), carla::rpc::ActorAttribute::is_modifiable, LIBCARLA_THROW_INVALID_VALUE, carla::StringUtil::ToLower(), carla::client::ActorAttributeValueAccess::Validate() , 以及 carla::rpc::ActorAttribute::value.

+ 函数调用图:

类成员变量说明

◆ _attribute

rpc::ActorAttribute carla::client::ActorAttribute::_attribute
private

该类的文档由以下文件生成: