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;
const rpc::Actor & operator()(const rpc::Actor &actor) const
void MakeActor(EpisodeProxy episode) const
const rpc::Actor & Serialize() const
ActorVariant & operator=(SharedPtr< client::Actor > actor)
Holds an Actor, but only instantiates it when needed.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
This file contains definitions of common data structures used in traffic manager. ...
boost::variant2::variant< rpc::Actor, SharedPtr< client::Actor > > _value
ActorDescription description
ActorVariant(rpc::Actor actor)
#define DEBUG_ASSERT(predicate)
ActorVariant(SharedPtr< client::Actor > actor)
bool operator==(ActorVariant rhs) const
ActorVariant & operator=(rpc::Actor actor)
bool operator!=(ActorVariant rhs) const
ActorId GetParentId() const
SharedPtr< client::Actor > Get(EpisodeProxy episode) const
const rpc::Actor & operator()(const SharedPtr< const client::Actor > &actor) const
const std::string & GetTypeId() const