Class Region
Defined in File Region.hpp
Class Documentation
-
class Region
A class to describe a region within spacetime.
This specifies the map whose coordinates should be used, a lower and upper bound to define a time range, and a set of geometry::Space objects to define regions with space.
For the geometry::Space objects, this class acts like an STL container and provides an iterator interface to specify, access, and modify them.
Public Types
-
template<typename E, typename I, typename F>
using base_iterator = rmf_traffic::detail::bidirectional_iterator<E, I, F>
-
using iterator = base_iterator<Space, IterImpl, Region>
-
using const_iterator = base_iterator<const Space, IterImpl, Region>
Public Functions
-
Region(std::string map, Time lower_bound, Time upper_bound, std::vector<Space> spaces)
Construct a region given the parameters.
- Parameters:
map – [in] The map whose coordinates will be used to define the regions in space.
lower_bound – [in] The lower bound for the time range.
upper_bound – [in] The upper bound for the time range.
spaces – [in] A vector of geometry::Space objects to define the desired regions in space.
-
Region(std::string map, std::vector<Space> spaces)
Construct a region with no time constraints.
- Parameters:
map – [in] The map whose coordinates will be used to define the regions in space.
spaces – [in] A vector of geometry::Space objects to define the desired regions in space.
-
const std::string &get_map() const
Get the name of the map that this Spacetime refers to.
-
const Time *get_lower_time_bound() const
Get the lower bound for the time range.
If there is no lower bound for the time range, then this returns a nullptr.
-
const Time *get_upper_time_bound() const
Get the upper bound for the time range.
If there is no upper bound for the time range, then this returns a nullptr.
-
void pop_back()
Remove the last region of space that was added.
-
iterator erase(iterator first, iterator last)
Erase a specific sets of regions of space based on their iterators.
-
const_iterator begin() const
const-qualified begin()
-
const_iterator cbegin() const
Explicitly const-qualified alternative for begin()
-
const_iterator end() const
const-qualified end()
-
const_iterator cend() const
Explicitly const-qualified alternative for end()
-
std::size_t num_spaces() const
Get the number of Space regions in this Spacetime region.
-
template<typename E, typename I, typename F>