RTC Toolkit  1.0.0
Classes | Public Member Functions | Friends | List of all members
rtctk::componentFramework::DataPointPath Class Reference

This class provides a wraper for DataPoint paths which ensures that they only contain valid characters. More...

#include <dataPointPath.hpp>

Classes

class  InvalidPathException
 Exception class used when an invalid character is used in a DataPointPath. More...
 

Public Member Functions

 DataPointPath ()=default
 
 DataPointPath (const DataPointPath &)=default
 
DataPointPathoperator= (const DataPointPath &)=default
 
 DataPointPath (DataPointPath &&)=default
 
DataPointPathoperator= (DataPointPath &&)=default
 
virtual ~DataPointPath ()=default
 
 DataPointPath (const std::string &new_path)
 Create DataPointPath from a string. More...
 
 DataPointPath (std::string &&new_path)
 Create DataPointPath from a string. More...
 
 DataPointPath (const char *const new_path)
 Create DataPointPath from a const char *. More...
 
const std::string & ToString () const noexcept
 Get string representing the DataPointPath. More...
 
DataPointPathoperator= (const std::string &new_path)
 Assignment operator from string. More...
 
DataPointPathoperator= (std::string &&new_path)
 Assignment operator from string (move) More...
 
 operator std::string () const noexcept
 This cast operator allows using DataPointPath in places where std::string is needed. More...
 
DataPointPathoperator+= (const DataPointPath &rhs)
 Append another DataPointPath to this DataPointPath without adding a path seperator. More...
 
DataPointPathoperator/= (const DataPointPath &rhs)
 Append another DataPointPath to this DataPointPath with a path seperator inbetween. More...
 
elt::mal::Uri ToRepositoryURI (const elt::mal::Uri &base_uri) const
 Return URI. More...
 

Friends

DataPointPath operator+ (DataPointPath lhs, const DataPointPath &rhs)
 Concatenate two DataPointPaths without adding a path seperator. More...
 
DataPointPath operator/ (DataPointPath lhs, const DataPointPath &rhs)
 Concatenate two DataPointPaths with a path seperator inbetween. More...
 
std::ostream & operator<< (std::ostream &out, const DataPointPath &rhs)
 Output to ostream. More...
 
bool operator== (const DataPointPath &lhs, const char *rhs) noexcept
 
bool operator!= (const DataPointPath &lhs, const char *rhs) noexcept
 
bool operator== (const DataPointPath &lhs, const std::string &rhs) noexcept
 
bool operator!= (const DataPointPath &lhs, const std::string &rhs) noexcept
 
bool operator== (const DataPointPath &lhs, const DataPointPath &rhs) noexcept
 
bool operator!= (const DataPointPath &lhs, const DataPointPath &rhs) noexcept
 
bool operator== (const char *lhs, const DataPointPath &rhs) noexcept
 
bool operator!= (const char *lhs, const DataPointPath &rhs) noexcept
 
bool operator== (const std::string &lhs, const DataPointPath &rhs) noexcept
 
bool operator!= (const std::string &lhs, const DataPointPath &rhs) noexcept
 
std::istream & operator>> (std::istream &input, DataPointPath &path)
 Read into DataPointPath from istream. More...
 

Detailed Description

This class provides a wraper for DataPoint paths which ensures that they only contain valid characters.

Trying to use paths with invalid characters with this class will raise an exception.

Constructor & Destructor Documentation

◆ DataPointPath() [1/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( )
default

◆ DataPointPath() [2/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( const DataPointPath )
default

◆ DataPointPath() [3/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( DataPointPath &&  )
default

◆ ~DataPointPath()

virtual rtctk::componentFramework::DataPointPath::~DataPointPath ( )
virtualdefault

◆ DataPointPath() [4/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( const std::string &  new_path)
explicit

Create DataPointPath from a string.

Parameters
new_paththe initial path
Exceptions
Canthrow a runtime error, when invalid characters are found. Only a-z,0-9,_,/ are allowed.

◆ DataPointPath() [5/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( std::string &&  new_path)
explicit

Create DataPointPath from a string.

Parameters
new_paththe initial path
Exceptions
Canthrow a runtime error, when invalid characters are found. Only a-z,0-9,_,/ are allowed.

◆ DataPointPath() [6/6]

rtctk::componentFramework::DataPointPath::DataPointPath ( const char *const  new_path)
inlineexplicit

Create DataPointPath from a const char *.

Parameters
new_paththe initial path
Exceptions
Canthrow a runtime error, when invalid characters are found. Only a-z,0-9,_,/ are allowed.

Member Function Documentation

◆ operator std::string()

rtctk::componentFramework::DataPointPath::operator std::string ( ) const
inlinenoexcept

This cast operator allows using DataPointPath in places where std::string is needed.

this will just return the internal string.

Cast operator to string (implicit)

◆ operator+=()

DataPointPath & rtctk::componentFramework::DataPointPath::operator+= ( const DataPointPath rhs)
inline

Append another DataPointPath to this DataPointPath without adding a path seperator.

Parameters
rhs

◆ operator/=()

DataPointPath & rtctk::componentFramework::DataPointPath::operator/= ( const DataPointPath rhs)
inline

Append another DataPointPath to this DataPointPath with a path seperator inbetween.

Parameters
rhs

◆ operator=() [1/4]

DataPointPath& rtctk::componentFramework::DataPointPath::operator= ( const DataPointPath )
default

◆ operator=() [2/4]

DataPointPath & rtctk::componentFramework::DataPointPath::operator= ( const std::string &  new_path)

Assignment operator from string.

Parameters
new_paththe new path to use
Exceptions
Canthrow a runtime error, when invalid characters are found. Only a-z,0-9,_,/ are allowed.

◆ operator=() [3/4]

DataPointPath& rtctk::componentFramework::DataPointPath::operator= ( DataPointPath &&  )
default

◆ operator=() [4/4]

DataPointPath & rtctk::componentFramework::DataPointPath::operator= ( std::string &&  new_path)

Assignment operator from string (move)

Parameters
new_paththe new path to use
Exceptions
Canthrow a runtime error, when invalid characters are found. Only a-z,0-9,_,/ are allowed.

◆ ToRepositoryURI()

elt::mal::Uri rtctk::componentFramework::DataPointPath::ToRepositoryURI ( const elt::mal::Uri &  base_uri) const

Return URI.

Parameters
base_urithe initial path This function generates an Uri, given a base_uri

◆ ToString()

const std::string & rtctk::componentFramework::DataPointPath::ToString ( ) const
inlinenoexcept

Get string representing the DataPointPath.

Friends And Related Function Documentation

◆ operator!= [1/5]

bool operator!= ( const char *  lhs,
const DataPointPath rhs 
)
friend

◆ operator!= [2/5]

bool operator!= ( const DataPointPath lhs,
const char *  rhs 
)
friend

◆ operator!= [3/5]

bool operator!= ( const DataPointPath lhs,
const DataPointPath rhs 
)
friend

◆ operator!= [4/5]

bool operator!= ( const DataPointPath lhs,
const std::string &  rhs 
)
friend

◆ operator!= [5/5]

bool operator!= ( const std::string &  lhs,
const DataPointPath rhs 
)
friend

◆ operator+

DataPointPath operator+ ( DataPointPath  lhs,
const DataPointPath rhs 
)
friend

Concatenate two DataPointPaths without adding a path seperator.

Parameters
lhsleft hand side operand
rhsright hand side operand

◆ operator/

DataPointPath operator/ ( DataPointPath  lhs,
const DataPointPath rhs 
)
friend

Concatenate two DataPointPaths with a path seperator inbetween.

Parameters
lhsleft hand side operand
rhsright hand side operand

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const DataPointPath rhs 
)
friend

Output to ostream.

◆ operator== [1/5]

bool operator== ( const char *  lhs,
const DataPointPath rhs 
)
friend

◆ operator== [2/5]

bool operator== ( const DataPointPath lhs,
const char *  rhs 
)
friend

◆ operator== [3/5]

bool operator== ( const DataPointPath lhs,
const DataPointPath rhs 
)
friend

◆ operator== [4/5]

bool operator== ( const DataPointPath lhs,
const std::string &  rhs 
)
friend

◆ operator== [5/5]

bool operator== ( const std::string &  lhs,
const DataPointPath rhs 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  input,
DataPointPath path 
)
friend

Read into DataPointPath from istream.


The documentation for this class was generated from the following files: