13#include <boost/optional.hpp>
26 return _state->GetEpisodeId();
35 return _state->GetTimestamp();
40 return _state->ContainsActorSnapshot(actor_id);
45 return _state->GetActorSnapshotIfPresent(actor_id);
68 return !(*
this == rhs);
73 std::shared_ptr<const detail::EpisodeState>
_state;
std::size_t frame
Number of frames elapsed since the simulator was launched.
size_t size() const
Return number of ActorSnapshots present in this WorldSnapshot.
bool Contains(ActorId actor_id) const
Check if an actor is present in this snapshot.
std::shared_ptr< const detail::EpisodeState > _state
auto begin() const
Return a begin iterator to the list of ActorSnapshots.
const Timestamp & GetTimestamp() const
Get timestamp of this snapshot.
uint64_t GetId() const
Get the id of the episode associated with this world.
bool operator!=(const WorldSnapshot &rhs) const
auto end() const
Return a past-the-end iterator to the list of ActorSnapshots.
bool operator==(const WorldSnapshot &rhs) const
WorldSnapshot(std::shared_ptr< const detail::EpisodeState > state)
boost::optional< ActorSnapshot > Find(ActorId actor_id) const
Find an ActorSnapshot by id.
This file contains definitions of common data structures used in traffic manager.