CARLA
Loading...
Searching...
No Matches
ActorAttribute.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  carla
 This file contains definitions of common data structures used in traffic manager.
namespace  carla::client

Macros

#define LIBCARLA_THROW_BAD_VALUE_CAST(type)
#define LIBCARLA_THROW_INVALID_VALUE(message)

Functions

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

Macro Definition Documentation

◆ LIBCARLA_THROW_BAD_VALUE_CAST

#define LIBCARLA_THROW_BAD_VALUE_CAST ( type)
Value:
if (GetType() != rpc::ActorAttributeType:: type) { \
throw_exception(BadAttributeCast(GetId() + ": bad attribute cast: cannot convert to " #type)); \
}

Definition at line 17 of file ActorAttribute.cpp.

Referenced by carla::client::ActorAttributeValueAccess::As< sensor::data::Color >(), carla::client::ActorAttributeValueAccess::As< std::string >(), and carla::client::ActorAttributeValueAccess::As().

◆ LIBCARLA_THROW_INVALID_VALUE

#define LIBCARLA_THROW_INVALID_VALUE ( message)