6#if !defined(ONIXS_CMEMDH_MESSAGING_NO_DEPRECATED)
10#include <OnixS/CME/MDH/messaging/String.h>
19class StrRef :
public Messaging::StrRef
21 typedef Messaging::StrRef Base;
33 StrRef(
const Messaging::Char* chars,
size_t size) noexcept
39 StrRef(
const Messaging::Char* chars) noexcept
40 : Base(chars ? Base(chars) : Base())
45 StrRef(
const std::string& str) noexcept
46 : Base(str.data(), str.size())
56 const Messaging::Char* items() const noexcept
64 static_cast<Base&
>(*this) = Base();
68 void reset(
const Messaging::Char* chars,
size_t size)
noexcept
70 static_cast<Base&
>(*this) = Base(chars, size);
74#if defined(ONIXS_CMEMDH_CXX17)
75inline bool operator==(Messaging::StrRef ref,
const std::string& str)
77 return ref == Messaging::toStrRef(str);
80inline bool operator!=(Messaging::StrRef ref,
const std::string& str)
82 return ref != Messaging::toStrRef(str);
85inline bool operator==(
const std::string& str, Messaging::StrRef ref)
87 return ref == Messaging::toStrRef(str);
90inline bool operator!=(
const std::string& str, Messaging::StrRef ref)
92 return ref != Messaging::toStrRef(str);
96using Messaging::toStr;
97using Messaging::toStrRef;
99inline bool operator==(
const StrRef& ref,
const std::string& str)
101 return static_cast<Messaging::StrRef
>(ref) == Messaging::toStrRef(str);
104inline bool operator!=(
const StrRef& ref,
const std::string& str)
106 return static_cast<Messaging::StrRef
>(ref) != Messaging::toStrRef(str);
109inline bool operator==(
const std::string& str,
const StrRef& ref)
111 return static_cast<Messaging::StrRef
>(ref) == Messaging::toStrRef(str);
114inline bool operator!=(
const std::string& str,
const StrRef& ref)
116 return static_cast<Messaging::StrRef
>(ref) != Messaging::toStrRef(str);
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_DEPRECATED
#define ONIXS_CMEMDH_DEPRECATED_HEADER(msg)
bool operator!=(const TimeSpan &left, const TimeSpan &right) noexcept
Compares Timespans.
char Char
Character type alias.
bool operator==(const TimeSpan &left, const TimeSpan &right) noexcept
Compares Timespans.
std::basic_string_view< Char > StrRef