Holds an Actor, but only instantiates it when needed. More...
#include <ActorVariant.h>
Classes | |
struct | Visitor |
Public Member Functions | |
ActorVariant (rpc::Actor actor) | |
ActorVariant (SharedPtr< client::Actor > actor) | |
SharedPtr< client::Actor > | Get (EpisodeProxy episode) const |
ActorId | GetId () const |
ActorId | GetParentId () const |
const std::string & | GetTypeId () const |
bool | operator!= (ActorVariant rhs) const |
ActorVariant & | operator= (rpc::Actor actor) |
ActorVariant & | operator= (SharedPtr< client::Actor > actor) |
bool | operator== (ActorVariant rhs) const |
const rpc::Actor & | Serialize () const |
Private Member Functions | |
void | MakeActor (EpisodeProxy episode) const |
Private Attributes | |
boost::variant2::variant< rpc::Actor, SharedPtr< client::Actor > > | _value |
Holds an Actor, but only instantiates it when needed.
Definition at line 30 of file ActorVariant.h.
|
inline |
Definition at line 33 of file ActorVariant.h.
|
inline |
Definition at line 36 of file ActorVariant.h.
|
inline |
Definition at line 49 of file ActorVariant.h.
References _value, DEBUG_ASSERT, and MakeActor().
Referenced by carla::sensor::data::CollisionEvent::GetActor(), carla::sensor::data::ObstacleDetectionEvent::GetActor(), carla::sensor::data::CollisionEvent::GetOtherActor(), carla::sensor::data::ObstacleDetectionEvent::GetOtherActor(), and carla::traffic_manager::TrafficManagerServer::TrafficManagerServer().
|
inline |
Definition at line 61 of file ActorVariant.h.
References carla::rpc::Actor::id, and Serialize().
Referenced by operator==().
|
inline |
Definition at line 65 of file ActorVariant.h.
References carla::rpc::Actor::parent_id, and Serialize().
|
inline |
Definition at line 69 of file ActorVariant.h.
References carla::rpc::Actor::description, carla::rpc::ActorDescription::id, and Serialize().
|
private |
Definition at line 16 of file ActorVariant.cpp.
References _value, carla::client::Disabled, and carla::client::detail::ActorFactory::MakeActor().
Referenced by Get(), and carla::client::detail::ActorVariant::Visitor::operator()().
|
inline |
Definition at line 77 of file ActorVariant.h.
|
inline |
Definition at line 39 of file ActorVariant.h.
References _value.
|
inline |
Definition at line 44 of file ActorVariant.h.
References _value.
|
inline |
Definition at line 73 of file ActorVariant.h.
References GetId().
|
inline |
Definition at line 57 of file ActorVariant.h.
References _value.
Referenced by GetId(), GetParentId(), and GetTypeId().
|
mutableprivate |
Definition at line 94 of file ActorVariant.h.
Referenced by Get(), MakeActor(), operator=(), and Serialize().