Class Patch
Defined in File Patch.hpp
Nested Relationships
Nested Types
Class Documentation
-
class Patch
A container of Database changes.
Public Types
-
template<typename E, typename I, typename F>
using base_iterator = rmf_traffic::detail::bidirectional_iterator<E, I, F>
-
using const_iterator = base_iterator<const Participant, IterImpl, Patch>
Public Functions
-
Patch(std::vector<Participant> changes, rmf_utils::optional<Change::Cull> cull, std::optional<Version> base_version, Version latest_version)
Constructor. Mirrors should evaluate the fields of the Patch class in the order of these constructor arguments.
- Parameters:
changes – [in] Information about how the participants have changed since the last update.
cull – [in] Information about how the database has culled old data since the last update.
base_version – [in] The base version of the database that this Patch builds on top of.
latest_version – [in] The lastest version of the database that this Patch represents.
-
const_iterator begin() const
Returns an iterator to the first element of the Patch.
-
const_iterator end() const
Returns an iterator to the element following the last element of the Patch. This iterator acts as a placeholder; attempting to dereference it results in undefined behavior.
-
class Participant
Public Functions
-
Participant(ParticipantId id, ItineraryVersion itinerary_version, Change::Erase erasures, std::vector<Change::Delay> delays, Change::Add additions, std::optional<Change::Progress> progress)
Constructor
- Parameters:
id – [in] The ID of the participant that is being changed
itinerary_version – [in] The version of this participant’s itinerary that results from applying this patch
erasures – [in] The information about which routes to erase
delays – [in] The information about what delays have occurred
additions – [in] The information about which routes to add
progress – [in] Information about progress that the participant has made since the last change, if any.
-
ParticipantId participant_id() const
The ID of the participant that this set of changes will patch.
-
ItineraryVersion itinerary_version() const
The itinerary version that results from this patch.
-
const Change::Erase &erasures() const
The route erasures to perform.
These erasures should be performed before any other changes.
-
const std::vector<Change::Delay> &delays() const
The sequence of delays to apply.
These delays should be applied in sequential order after the erasures are performed, and before any additions are performed.
-
Participant(ParticipantId id, ItineraryVersion itinerary_version, Change::Erase erasures, std::vector<Change::Delay> delays, Change::Add additions, std::optional<Change::Progress> progress)
-
template<typename E, typename I, typename F>