A ServiceLocator is a container for ServiceLocations.
More...
#include <ServiceLocator.hpp>
A ServiceLocator is a container for ServiceLocations.
This class serves as a container and provides some convenience functions for updating information from string
◆ ServiceLocator() [1/2]
| fipa::services::ServiceLocator::ServiceLocator |
( |
| ) |
|
|
inline |
◆ ServiceLocator() [2/2]
| fipa::services::ServiceLocator::ServiceLocator |
( |
const ServiceLocations & |
locations | ) |
|
◆ addLocation()
| void fipa::services::ServiceLocator::addLocation |
( |
const ServiceLocation & |
location | ) |
|
|
inline |
Add a service location
- Parameters
-
| location | A service location that shall be added to the container, does not check on duplicates |
◆ fromString()
| ServiceLocator fipa::services::ServiceLocator::fromString |
( |
const std::string & |
locations | ) |
|
|
static |
◆ getFirstLocation()
Get the first location, i.e. the one with highest priority
- Returns
- ServiceLocation of highest priority
◆ getLocations()
◆ hasLocations()
| bool fipa::services::ServiceLocator::hasLocations |
( |
| ) |
const |
|
inline |
Check if this locator contains any locations
- Returns
- true if locations exists, false otherwise
◆ search()
Search for a service location, e.g. given a certain signature type
- Parameters
-
| regex | Regex that is matched according to the parameter 'field' |
| field | Field to which the first parameter ('regex') should be applied |
- Returns
- List of matches
- Exceptions
-
| NotFound | if not locations could be found |
◆ toString()
| std::string fipa::services::ServiceLocator::toString |
( |
| ) |
const |
Create string representation of service locator <address-0> <signature-type-0> <service-signature-0>;<address-1> <...>
- Returns
- stringified object
◆ updateFromString()
| void fipa::services::ServiceLocator::updateFromString |
( |
const std::string & |
locations | ) |
|
Parses a string using ';' as separators and updates the ServiceLocator object
- Parameters
-
| locations | List of ';' separated locations |
The documentation for this class was generated from the following files: