A history of routes: a browser's session history, or a test's.
virtual void onPop(std::function< void(std::string const &route)> popped)=0
Sets what is called when the current entry changes from outside: back, forward, or an address the use...
virtual void push(std::string const &route)=0
Adds an entry after the current one, dropping any entries forward of it, and makes it current.
virtual void replace(std::string const &route)=0
Replaces the route the current entry holds.
virtual std::string current() const =0
The route the current entry holds.
Keeps the route of the screen a shell shows in a history, and opens the route of an entry the user mo...
void shown(std::string const &route)
The shell now shows a screen whose route is route.
std::string const & initial() const noexcept
The route the history held when this was made: a reloaded page's, or a shared link's.
RouteHistory(IHistory &history, std::function< void(std::string const &route)> open)
A history over history, which it keeps and follows from now on.
std::string fragmentOf(std::string_view route)
The URL fragment that holds a route.
std::string routeOfFragment(std::string_view fragment)
The route a URL fragment holds.