17#pragma warning(disable:4583)
18#pragma warning(disable:4582)
19#include <boost/variant2/variant.hpp>
22#include <boost/variant2/variant.hpp>
50 if (
_value.index() == 0u) {
54 return boost::variant2::get<SharedPtr<client::Actor>>(
_value);
78 return !(*
this == rhs);
88 return actor->Serialize();
94 mutable boost::variant2::variant<rpc::Actor, SharedPtr<client::Actor>>
_value;
#define DEBUG_ASSERT(predicate)
Holds an Actor, but only instantiates it when needed.
bool operator==(ActorVariant rhs) const
void MakeActor(EpisodeProxy episode) const
bool operator!=(ActorVariant rhs) const
const rpc::Actor & Serialize() const
ActorVariant(SharedPtr< client::Actor > actor)
boost::variant2::variant< rpc::Actor, SharedPtr< client::Actor > > _value
ActorId GetParentId() const
ActorVariant & operator=(SharedPtr< client::Actor > actor)
ActorVariant & operator=(rpc::Actor actor)
const std::string & GetTypeId() const
ActorVariant(rpc::Actor actor)
SharedPtr< client::Actor > Get(EpisodeProxy episode) const
ActorDescription description
This file contains definitions of common data structures used in traffic manager.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
const rpc::Actor & operator()(const SharedPtr< const client::Actor > &actor) const
const rpc::Actor & operator()(const rpc::Actor &actor) const