Class Region¶
Defined in File Region.hpp
Class Documentation¶
-
class
rmf_traffic
::
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
-
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
[in] map
: The map whose coordinates will be used to define the regions in space.[in] lower_bound
: The lower bound for the time range.[in] upper_bound
: The upper bound for the time range.[in] spaces
: 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
[in] map
: The map whose coordinates will be used to define the regions in space.[in] spaces
: 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.
-
using