CARLA
Public Member Functions | Protected Member Functions | List of all members
carla::client::ActorAttributeValueAccess Class Referenceabstract

#include <ActorAttribute.h>

+ Inheritance diagram for carla::client::ActorAttributeValueAccess:

Public Member Functions

 ActorAttributeValueAccess ()=default
 
 ActorAttributeValueAccess (ActorAttributeValueAccess const &)=default
 
 ActorAttributeValueAccess (ActorAttributeValueAccess &&)=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. 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
 
virtual const std::string & GetId () const =0
 
virtual rpc::ActorAttributeType GetType () const =0
 
template<typename T >
bool operator!= (const T &rhs) const
 
ActorAttributeValueAccessoperator= (ActorAttributeValueAccess const &)=default
 
ActorAttributeValueAccessoperator= (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
 

Protected Member Functions

virtual const std::string & GetValue () const =0
 
void Validate () const
 

Detailed Description

Definition at line 47 of file LibCarla/source/carla/client/ActorAttribute.h.

Constructor & Destructor Documentation

◆ ActorAttributeValueAccess() [1/3]

carla::client::ActorAttributeValueAccess::ActorAttributeValueAccess ( )
default

◆ ActorAttributeValueAccess() [2/3]

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

◆ ActorAttributeValueAccess() [3/3]

carla::client::ActorAttributeValueAccess::ActorAttributeValueAccess ( ActorAttributeValueAccess &&  )
default

◆ ~ActorAttributeValueAccess()

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

Member Function Documentation

◆ As() [1/10]

template<>
bool carla::client::ActorAttributeValueAccess::As ( ) const

Definition at line 35 of file ActorAttribute.cpp.

References Bool, carla::client::ActorAttribute::GetValue(), LIBCARLA_THROW_BAD_VALUE_CAST, LIBCARLA_THROW_INVALID_VALUE, and carla::StringUtil::ToLowerCopy().

+ Here is the call graph for this function:

◆ As() [2/10]

template<>
int carla::client::ActorAttributeValueAccess::As ( ) const

Definition at line 47 of file ActorAttribute.cpp.

References carla::client::ActorAttribute::GetValue(), Int, and LIBCARLA_THROW_BAD_VALUE_CAST.

+ Here is the call graph for this function:

◆ As() [3/10]

template<>
float carla::client::ActorAttributeValueAccess::As ( ) const

Definition at line 53 of file ActorAttribute.cpp.

References Float, carla::client::ActorAttribute::GetValue(), LIBCARLA_THROW_BAD_VALUE_CAST, and LIBCARLA_THROW_INVALID_VALUE.

+ Here is the call graph for this function:

◆ As() [4/10]

template<typename T >
T carla::client::ActorAttributeValueAccess::As ( ) const

Cast the value to the given type.

Exceptions
BadAttributeCastif the cast fails.

◆ As() [5/10]

template<rpc::ActorAttributeType Type>
auto carla::client::ActorAttributeValueAccess::As ( ) const

Cast the value to the type specified by the enum carla::rpc::ActorAttributeType.

Exceptions
BadAttributeCastif the cast fails.

◆ As() [6/10]

template<>
bool carla::client::ActorAttributeValueAccess::As ( ) const

◆ As() [7/10]

template<>
int carla::client::ActorAttributeValueAccess::As ( ) const

◆ As() [8/10]

template<>
float carla::client::ActorAttributeValueAccess::As ( ) const

◆ As() [9/10]

template<>
std::string carla::client::ActorAttributeValueAccess::As ( ) const

◆ As() [10/10]

template<>
sensor::data::Color carla::client::ActorAttributeValueAccess::As ( ) const

◆ GetId()

virtual const std::string& carla::client::ActorAttributeValueAccess::GetId ( ) const
pure virtual

◆ GetType()

virtual rpc::ActorAttributeType carla::client::ActorAttributeValueAccess::GetType ( ) const
pure virtual

Implemented in carla::client::ActorAttribute, and carla::client::ActorAttributeValue.

Referenced by operator==().

+ Here is the caller graph for this function:

◆ GetValue()

virtual const std::string& carla::client::ActorAttributeValueAccess::GetValue ( ) const
protectedpure virtual

Implemented in carla::client::ActorAttribute, and carla::client::ActorAttributeValue.

Referenced by operator==().

+ Here is the caller graph for this function:

◆ operator!=()

template<typename T >
bool carla::client::ActorAttributeValueAccess::operator!= ( const T &  rhs) const
inline

◆ operator=() [1/2]

ActorAttributeValueAccess& carla::client::ActorAttributeValueAccess::operator= ( ActorAttributeValueAccess const &  )
default

◆ operator=() [2/2]

ActorAttributeValueAccess& carla::client::ActorAttributeValueAccess::operator= ( ActorAttributeValueAccess &&  )
default

◆ operator==() [1/4]

template<typename T >
bool carla::client::ActorAttributeValueAccess::operator== ( const T &  rhs) const
inline

◆ operator==() [2/4]

template<>
bool carla::client::ActorAttributeValueAccess::operator== ( const ActorAttributeValueAccess rhs) const
inline

Definition at line 135 of file LibCarla/source/carla/client/ActorAttribute.h.

References carla::road::element::GetType(), GetType(), and GetValue().

+ Here is the call graph for this function:

◆ operator==() [3/4]

template<>
bool carla::client::ActorAttributeValueAccess::operator== ( const ActorAttributeValue rhs) const
inline

◆ operator==() [4/4]

template<>
bool carla::client::ActorAttributeValueAccess::operator== ( const ActorAttribute rhs) const
inline

◆ Validate()

void carla::client::ActorAttributeValueAccess::Validate ( ) const
protected

Definition at line 91 of file ActorAttribute.cpp.

References carla::rpc::Bool, carla::rpc::Float, carla::client::ActorAttribute::GetType(), carla::rpc::Int, LIBCARLA_THROW_INVALID_VALUE, carla::rpc::RGBColor, and carla::rpc::String.

Referenced by carla::client::ActorAttribute::Set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: