Contains uri parts splitted.
More...
#include <uriutils.hpp>
|
string | getWithoutPath () const |
| Retrieve URI without path.
|
|
string | joinPathParts (string separator="/") |
| Returns path parts joined with the provided string.
|
|
string | pathAt (int position) |
| Retrieves a part of a path.
|
|
void | reset () |
| Clears the inners of the class.
|
|
bool | split (const string &uri) |
| Splits a string format uri into its parts.
|
|
bool | valid () const |
| Is object valid.
|
|
|
static string | getDomain (const string &source) |
| static function to return the domain part.
|
|
static string | joinedPathParts (const string &source) |
| static function to return joined path parts.
|
|
static string | removeProtocol (const string &uri) |
| Removes the protocol portion, e.g.
|
|
|
string | domain |
| service://something/else => something
|
|
list< string > | pathparts |
| path parts service://something/first/second => [0]=first,[1]=second
|
|
string | protocol |
| service://something => service
|
|
Contains uri parts splitted.
◆ getDomain()
static string kanzi::connect::UriUtil::getDomain |
( |
const string & | source | ) |
|
|
inlinestatic |
static function to return the domain part.
from servicedata://media/kissa/kala would return "media"
- Parameters
-
source | the source to process |
- Returns
- the domain
◆ getWithoutPath()
string kanzi::connect::UriUtil::getWithoutPath |
( |
| ) |
const |
|
inline |
Retrieve URI without path.
- Returns
- uri without path
◆ joinedPathParts()
static string kanzi::connect::UriUtil::joinedPathParts |
( |
const string & | source | ) |
|
|
inlinestatic |
static function to return joined path parts.
E.g. from servicedata://media/kissa/kala would return "kissa/kala"
- Parameters
-
source | the source to process |
- Returns
- the path parts.
◆ joinPathParts()
string kanzi::connect::UriUtil::joinPathParts |
( |
string | separator = "/" | ) |
|
|
inline |
Returns path parts joined with the provided string.
- Parameters
-
separator | The separator string. Optional. |
- Returns
- Constructed string.
◆ pathAt()
string kanzi::connect::UriUtil::pathAt |
( |
int | position | ) |
|
|
inline |
Retrieves a part of a path.
- Parameters
-
position | Position of the path. |
- Returns
- Part of path
◆ removeProtocol()
static string kanzi::connect::UriUtil::removeProtocol |
( |
const string & | uri | ) |
|
|
static |
Removes the protocol portion, e.g.
service:// from the uri
- Parameters
-
uri | where to remove the procotocl from |
- Returns
- the path without the protocol.
◆ reset()
void kanzi::connect::UriUtil::reset |
( |
| ) |
|
|
inline |
Clears the inners of the class.
◆ split()
bool kanzi::connect::UriUtil::split |
( |
const string & | uri | ) |
|
Splits a string format uri into its parts.
- Parameters
-
uri | the uri to be split E.g. service://cluster/path/to/data |
- Returns
- true if uri is overall valid.
◆ valid()
bool kanzi::connect::UriUtil::valid |
( |
| ) |
const |
|
inline |
Is object valid.
- Returns
- true if valid.
◆ domain
string kanzi::connect::UriUtil::domain |
service://something/else => something
◆ pathparts
list<string> kanzi::connect::UriUtil::pathparts |
path parts service://something/first/second => [0]=first,[1]=second
◆ protocol
string kanzi::connect::UriUtil::protocol |
service://something => service
The documentation for this class was generated from the following file:
- connect/runtimedata/uriutils.hpp