RouteCollection object.
More...
|
| int | size () const noexcept |
| | Get number of routes in this collection.
|
| const RouteRef | getRoute (int index) const noexcept |
| | Get route specified by index.
|
| int | indexOf (const Route &route) const noexcept |
| | Get index of the specified route - return < 0 for error.
|
| bool | isMainRoute (const Route &route) const noexcept |
| | Check if the route is the main route in the collection.
|
| const RouteRef | getMainRoute () const noexcept |
| | Get the current main route.
|
| RouteCollection & | setMainRoute (const Route &route) noexcept |
| | Set the route as main route in the collection.
|
| RouteCollection & | add (const Route &route, bool bMainRoute) noexcept |
| | Add a route in the collection.
|
| RouteCollection & | remove (const Route &route) noexcept |
| | Remove the route specified by Route.
|
| bool | contains (const Route &route) const noexcept |
| | Check if a route object is in collection.
|
|
void | clear () noexcept |
| | Remove all routes.
|
| template<typename TCollector> |
| bool | iterateRoutes (TCollector collector) const |
| | Iterate all routes in the collection.
|
RouteCollection object.
Implements share-read / write Api object over IRouteCollection.
◆ add()
Add a route in the collection.
- Parameters
-
| [in] | route | The route to be added. |
| [in] | bMainRoute | True if the route is the main route, false if alternative route |
- Returns
- RouteCollection object
◆ contains()
| bool gem::RouteCollection::contains |
( |
const Route & | route | ) |
const |
|
inlinenoexcept |
Check if a route object is in collection.
- Parameters
-
| [in] | route | The route to be checked |
- Returns
- True if the route is in the collection
◆ getMainRoute()
| const RouteRef gem::RouteCollection::getMainRoute |
( |
| ) |
const |
|
inlinenoexcept |
Get the current main route.
- Returns
- The main route in the collection
◆ getRoute()
| const RouteRef gem::RouteCollection::getRoute |
( |
int | index | ) |
const |
|
inlinenoexcept |
Get route specified by index.
- Parameters
-
| [in] | index | The index of the route in the collection |
- Returns
- The route object
◆ indexOf()
| int gem::RouteCollection::indexOf |
( |
const Route & | route | ) |
const |
|
inlinenoexcept |
Get index of the specified route - return < 0 for error.
- Parameters
-
| [in] | route | The route to be found |
- Returns
- The index of the route in the collection
◆ isMainRoute()
| bool gem::RouteCollection::isMainRoute |
( |
const Route & | route | ) |
const |
|
inlinenoexcept |
Check if the route is the main route in the collection.
- Parameters
-
| [in] | route | The route to be checked |
- Returns
- True if the route is the main route in the collection
◆ iterateRoutes()
template<typename TCollector>
| bool gem::RouteCollection::iterateRoutes |
( |
TCollector | collector | ) |
const |
|
inline |
Iterate all routes in the collection.
Collector should return true if iteration should continue and false if iteration should stop
- Parameters
-
| [in] | collector | The collector function |
- Returns
- true if all routes were iterated, false if iteration was stopped
◆ remove()
Remove the route specified by Route.
- Parameters
-
| [in] | route | route in the collection |
- Returns
- RouteCollection object
◆ setMainRoute()
Set the route as main route in the collection.
- Parameters
-
| [in] | route | The route to be set as main route |
- Returns
- RouteCollection object
◆ size()
| int gem::RouteCollection::size |
( |
| ) |
const |
|
inlinenoexcept |
Get number of routes in this collection.
- Returns
- The number of routes in the collection.