Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_DATAPOINTPATH_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_DATAPOINTPATH_HPP
20 #include <string_view>
21 #include <type_traits>
23 #include <mal/utility/Uri.hpp>
41 using elt::error::CiiBaseException::CiiBaseException;
80 const std::string&
ToString() const noexcept;
103 operator
std::
string() const noexcept;
138 friend
bool operator==(const
DataPointPath& lhs, const
char* rhs) noexcept;
139 friend
bool operator!=(const
DataPointPath& lhs, const
char* rhs) noexcept {
140 return !(lhs == rhs);
145 return !(lhs == rhs);
150 return !(lhs == rhs);
158 return !(rhs == lhs);
165 return !(rhs == lhs);
180 const static std::regex REGEX_VALID_CHARS;
182 static bool ValidPath(
const std::string& path);
189 const static char VALID_CHARACTERS[];
192 DataPointPath
operator"" _dppath(
const char* str, std::size_t len);
197 return lhs.path == rhs;
201 return lhs.path == rhs;
205 return lhs.path == rhs.path;
223 this->path += rhs.path;
228 this->path +=
"/" + rhs.path;
236 inline DataPointPath::operator std::string() const noexcept {
247 #endif // RTCTK_COMPONENTFRAMEWORK_DATAPOINTPATH_HPP
Provides macros and utilities for exception handling.
DataPointPath(DataPointPath &&)=default
DataPointPath operator/(DataPointPath lhs, const DataPointPath &rhs)
Definition: dataPointPath.hpp:213
friend std::istream & operator>>(std::istream &input, DataPointPath &path)
Read into DataPointPath from istream.
Definition: dataPointPath.cpp:68
DataPointPath & operator=(DataPointPath &&)=default
Definition: commandReplier.cpp:20
friend bool operator==(const char *lhs, const DataPointPath &rhs) noexcept
Definition: dataPointPath.hpp:154
const std::string & ToString() const noexcept
Get string representing the DataPointPath.
Definition: dataPointPath.hpp:218
virtual ~DataPointPath()=default
DataPointPath & operator=(const DataPointPath &)=default
friend bool operator!=(const DataPointPath &lhs, const std::string &rhs) noexcept
Definition: dataPointPath.hpp:144
DataPointPath(const DataPointPath &)=default
friend bool operator==(const DataPointPath &lhs, const char *rhs) noexcept
Definition: dataPointPath.hpp:196
friend bool operator==(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition: dataPointPath.hpp:161
InvalidPathException(const std::string &path)
Definition: dataPointPath.cpp:17
DataPointPath & operator+=(const DataPointPath &rhs)
Append another DataPointPath to this DataPointPath without adding a path seperator.
Definition: dataPointPath.hpp:222
friend bool operator!=(const char *lhs, const DataPointPath &rhs) noexcept
Definition: dataPointPath.hpp:157
Exception class used when an invalid character is used in a DataPointPath.
Definition: dataPointPath.hpp:39
std::ostream & operator<<(std::ostream &out, const DataPointPath &rhs)
Definition: dataPointPath.hpp:240
Definition: mudpiProcessingError.hpp:119
friend bool operator!=(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition: dataPointPath.hpp:164
DataPointPath(const char *const new_path)
Create DataPointPath from a const char *.
Definition: dataPointPath.hpp:74
friend bool operator!=(const DataPointPath &lhs, const DataPointPath &rhs) noexcept
Definition: dataPointPath.hpp:149
This class provides a wraper for DataPoint paths which ensures that they only contain valid character...
Definition: dataPointPath.hpp:34
DataPointPath & operator/=(const DataPointPath &rhs)
Append another DataPointPath to this DataPointPath with a path seperator inbetween.
Definition: dataPointPath.hpp:227
bool operator==(const DataPointPath &lhs, const char *rhs) noexcept
Definition: dataPointPath.hpp:196
DataPointPath operator+(DataPointPath lhs, const DataPointPath &rhs)
Definition: dataPointPath.hpp:208
elt::mal::Uri ToRepositoryURI(const elt::mal::Uri &base_uri) const
Return URI.
Definition: dataPointPath.cpp:60