Kanzi Connect  3.9.8
Kanzi Connect C++ API
kanzi::connect::UriUtil Class Reference

Contains uri parts splitted. More...

#include <uriutils.hpp>

Public Member Functions

string getWithoutPath () const
 Retrieve URI without path. More...
 
string joinPathParts (string separator="/")
 Returns path parts joined with the provided string. More...
 
string pathAt (int position)
 Retrieves a part of a path. More...
 
void reset ()
 Clears the inners of the class. More...
 
bool split (const string &uri)
 Splits a string format uri into its parts. More...
 
bool valid () const
 Is object valid. More...
 

Static Public Member Functions

static string getDomain (const string &source)
 static function to return the domain part. More...
 
static string joinedPathParts (const string &source)
 static function to return joined path parts. More...
 
static string removeProtocol (const string &uri)
 Removes the protocol portion, e.g. More...
 

Public Attributes

string domain
 service://something/else => something More...
 
list< string > pathparts
 path parts service://something/first/second => [0]=first,[1]=second More...
 
string protocol
 service://something => service More...
 

Detailed Description

Contains uri parts splitted.

Member Function Documentation

◆ 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
sourcethe 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
sourcethe 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
separatorThe separator string. Optional.
Returns
Constructed string.

◆ pathAt()

string kanzi::connect::UriUtil::pathAt ( int  position)
inline

Retrieves a part of a path.

Parameters
positionPosition 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
uriwhere 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
urithe 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.

Member Data Documentation

◆ 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: