12#ifndef RTCTK_COMPONENTFRAMEWORK_DATAPOINTPATH_HPP
13#define RTCTK_COMPONENTFRAMEWORK_DATAPOINTPATH_HPP
19#include <fmt/format.h>
20#include <mal/utility/Uri.hpp>
124 const std::string& ToString() const noexcept;
148 operator
std::
string() const noexcept;
205 friend
bool operator==(const
DataPointPath& lhs, const
char* rhs) noexcept;
206 friend
bool operator!=(const
DataPointPath& lhs, const
char* rhs) noexcept {
207 return !(lhs == rhs);
216 return !(lhs == rhs);
225 return !(lhs == rhs);
237 return !(rhs == lhs);
256 return !(rhs == lhs);
286 elt::mal::Uri ToRepositoryURI(
const elt::mal::Uri& base_uri)
const;
297 std::pair<DataPointPath, DataPointPath> Split()
const;
320 bool IsAbsolutePath()
const;
329 std::vector<DataPointPath> SplitAll()
const;
344 static elt::mal::Uri AppendSuffixToUriPath(
const std::string& suffix,
const elt::mal::Uri& uri);
352 RTCTK_LOCAL static bool ValidPath(
const std::string& path);
357 RTCTK_LOCAL const static std::string VALID_CHARACTERS;
360 RTCTK_LOCAL const static std::regex REGEX_VALID_CHARS;
363RTCTK_API DataPointPath
operator"" _dppath(
const char* str, std::size_t len);
368 return lhs.m_path == rhs;
372 return lhs.m_path < rhs;
376 return lhs.m_path <= rhs;
380 return lhs.m_path > rhs;
384 return lhs.m_path >= rhs;
388 return lhs.m_path == rhs;
392 return lhs.m_path < rhs;
396 return lhs.m_path <= rhs;
400 return lhs.m_path > rhs;
404 return lhs.m_path >= rhs;
408 return lhs.m_path == rhs.m_path;
412 return lhs.m_path < rhs.m_path;
416 return lhs.m_path <= rhs.m_path;
420 return lhs.m_path > rhs.m_path;
424 return lhs.m_path >= rhs.m_path;
445inline DataPointPath::operator std::string() const noexcept {
470struct RTCTK_API formatter<
rtctk::componentFramework::DataPointPath> : formatter<std::string> {
472 -> format_context::iterator;
InvalidPathException(const std::string &path)
Definition dataPointPath.cpp:19
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:76
friend bool operator!=(const DataPointPath &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:224
friend bool operator<=(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:261
friend bool operator>=(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:248
friend bool operator>(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:245
friend bool operator<(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:239
friend bool operator!=(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:255
friend bool operator>=(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:267
friend bool operator!=(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:236
friend bool operator!=(const DataPointPath &lhs, const std::string &rhs) noexcept
Definition dataPointPath.hpp:215
friend bool operator<=(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:242
friend bool operator<(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:258
const std::string & ToString() const noexcept
Get string representing the DataPointPath.
Definition dataPointPath.hpp:437
friend bool operator>(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:264
operator std::string() const noexcept
Cast operator to string (implicit).
Definition dataPointPath.hpp:445
DataPointPath(const char *const new_path)
Create DataPointPath from a null terminated character string.
Definition dataPointPath.hpp:118
DataPointPath & operator=(DataPointPath &&)=default
DataPointPath & operator=(const DataPointPath &)=default
DataPointPath(DataPointPath &&)=default
friend bool operator==(const std::string &lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:252
friend bool operator==(const char *lhs, const DataPointPath &rhs) noexcept
Definition dataPointPath.hpp:233
DataPointPath(const DataPointPath &)=default
RtctkException() noexcept
Definition exceptions.cpp:112
Project-wide configuration header.
#define RTCTK_LOCAL
Helper to hide a class or function from the public symbol table.
Definition config.hpp:59
#define RTCTK_API
Helper to indicate that a class or function must be exported in the public symbol table.
Definition config.hpp:32
Provides macros and utilities for exception handling.
Defines the JSON payload type JsonPayload.
Definition dataPointPath.hpp:464
Definition commandReplier.cpp:21
DataPointPath operator/(DataPointPath lhs, const DataPointPath &rhs)
Definition dataPointPath.hpp:432
bool operator<=(const DataPointPath &lhs, const char *rhs) noexcept
Definition dataPointPath.hpp:375
bool operator>(const DataPointPath &lhs, const char *rhs) noexcept
Definition dataPointPath.hpp:379
bool operator==(const DataPointPath &lhs, const char *rhs) noexcept
Definition dataPointPath.hpp:367
void to_json(JsonPayload &j, const DataPointPath &v)
Definition dataPointPath.cpp:217
std::istream & operator>>(std::istream &input, DataPointPath &path)
Definition dataPointPath.cpp:203
bool operator>=(const DataPointPath &lhs, const char *rhs) noexcept
Definition dataPointPath.hpp:383
nlohmann::json JsonPayload
Type requirements:
Definition jsonPayload.hpp:24
std::ostream & operator<<(std::ostream &out, const DataPointPath &rhs)
Definition dataPointPath.hpp:449
void from_json(const JsonPayload &j, DataPointPath &v)
Definition dataPointPath.cpp:222
bool operator<(const DataPointPath &lhs, const char *rhs) noexcept
Definition dataPointPath.hpp:371
DataPointPath operator+(DataPointPath lhs, const DataPointPath &rhs)
Definition dataPointPath.hpp:427
Definition commandReplier.cpp:21
Definition ddsSub.hpp:155