CARLA
Namespaces | Macros | Functions
ActorAttribute.cpp File Reference
#include "carla/client/ActorAttribute.h"
#include "carla/Exception.h"
#include "carla/Logging.h"
#include "carla/StringUtil.h"
+ Include dependency graph for ActorAttribute.cpp:

Go to the source code of this file.

Namespaces

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

Macros

#define LIBCARLA_THROW_BAD_VALUE_CAST(type)
 
#define LIBCARLA_THROW_INVALID_VALUE(message)   throw_exception(InvalidAttributeValue(GetId() + ": " + 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)); \
}
static LaneMarking::Type GetType(std::string str)
Definition: LaneMarking.cpp:17

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)    throw_exception(InvalidAttributeValue(GetId() + ": " + message));