An attribute of an ActorBlueprint. More...
#include <ActorAttribute.h>
Public Member Functions | |
ActorAttribute (rpc::ActorAttribute attribute) | |
ActorAttribute (ActorAttribute const &)=default | |
ActorAttribute (ActorAttribute &&)=default | |
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. More... | |
ActorAttribute & | operator= (ActorAttribute const &)=default |
ActorAttribute & | operator= (ActorAttribute &&)=default |
void | Set (std::string value) |
Set the value of this attribute. More... | |
virtual | ~ActorAttribute ()=default |
Public Member Functions inherited from carla::client::ActorAttributeValueAccess | |
ActorAttributeValueAccess ()=default | |
ActorAttributeValueAccess (ActorAttributeValueAccess const &)=default | |
ActorAttributeValueAccess (ActorAttributeValueAccess &&)=default | |
template<> | |
bool | As () const |
template<> | |
int | As () const |
template<> | |
float | As () const |
template<typename T > | |
T | As () const |
Cast the value to the given type. More... | |
template<rpc::ActorAttributeType Type> | |
auto | As () const |
Cast the value to the type specified by the enum carla::rpc::ActorAttributeType. More... | |
template<> | |
bool | As () const |
template<> | |
int | As () const |
template<> | |
float | As () const |
template<> | |
std::string | As () const |
template<> | |
sensor::data::Color | As () const |
template<typename T > | |
bool | operator!= (const T &rhs) const |
ActorAttributeValueAccess & | operator= (ActorAttributeValueAccess const &)=default |
ActorAttributeValueAccess & | operator= (ActorAttributeValueAccess &&)=default |
template<typename T > | |
bool | operator== (const T &rhs) const |
template<> | |
bool | operator== (const ActorAttributeValueAccess &rhs) const |
template<> | |
bool | operator== (const ActorAttributeValue &rhs) const |
template<> | |
bool | operator== (const ActorAttribute &rhs) const |
virtual | ~ActorAttributeValueAccess ()=default |
Private Attributes | |
rpc::ActorAttribute | _attribute |
Additional Inherited Members | |
Protected Member Functions inherited from carla::client::ActorAttributeValueAccess | |
void | Validate () const |
An attribute of an ActorBlueprint.
Definition at line 184 of file LibCarla/source/carla/client/ActorAttribute.h.
|
inline |
Definition at line 187 of file LibCarla/source/carla/client/ActorAttribute.h.
|
default |
|
default |
|
virtualdefault |
|
inlineoverridevirtual |
Implements carla::client::ActorAttributeValueAccess.
Definition at line 200 of file LibCarla/source/carla/client/ActorAttribute.h.
|
inline |
Definition at line 208 of file LibCarla/source/carla/client/ActorAttribute.h.
Referenced by carla::client::BlueprintLibrary::FilterByAttribute().
|
inlineoverridevirtual |
Implements carla::client::ActorAttributeValueAccess.
Definition at line 204 of file LibCarla/source/carla/client/ActorAttribute.h.
Referenced by Set(), and carla::client::ActorAttributeValueAccess::Validate().
|
inlineoverridevirtual |
Implements carla::client::ActorAttributeValueAccess.
Definition at line 227 of file LibCarla/source/carla/client/ActorAttribute.h.
Referenced by carla::client::ActorAttributeValueAccess::As< sensor::data::Color >(), carla::client::ActorAttributeValueAccess::As< std::string >(), carla::client::ActorAttributeValueAccess::As(), and carla::client::BlueprintLibrary::FilterByAttribute().
|
inline |
Definition at line 212 of file LibCarla/source/carla/client/ActorAttribute.h.
|
inline |
Serialize this object as a carla::rpc::ActorAttributeValue.
Definition at line 223 of file LibCarla/source/carla/client/ActorAttribute.h.
|
default |
|
default |
void carla::client::ActorAttribute::Set | ( | std::string | value | ) |
Set the value of this attribute.
InvalidAttributeValue | if attribute is not modifiable. |
InvalidAttributeValue | if format does not match this type. |
Definition at line 22 of file ActorAttribute.cpp.
References _attribute, carla::rpc::Bool, GetType(), carla::rpc::ActorAttribute::is_modifiable, LIBCARLA_THROW_INVALID_VALUE, carla::StringUtil::ToLower(), carla::client::ActorAttributeValueAccess::Validate(), and carla::rpc::ActorAttribute::value.
|
private |
Definition at line 232 of file LibCarla/source/carla/client/ActorAttribute.h.
Referenced by Set().