35#ifndef OPENSWMM_ENGINE_FILE_PATH_PAIR_HPP
36#define OPENSWMM_ENGINE_FILE_PATH_PAIR_HPP
171 operator const std::string&()
const noexcept {
return original; }
183 [[nodiscard]] std::size_t
size() const noexcept {
return original.size(); }
188 [[nodiscard]]
const char*
c_str() const noexcept {
return original.c_str(); }
193 [[nodiscard]]
const std::string&
str() const noexcept {
return original; }
269 return s ? (a.original == s) : a.original.empty();
Definition ExchangeLaw.hpp:60
friend bool operator!=(const FilePathPair &a, const char *s)
Compare authored tokens for exact-byte inequality.
Definition FilePathPair.hpp:290
FilePathPair(FilePathPair &&) noexcept=default
Move the authored token and resolved cache from another pair.
std::size_t size() const noexcept
Count bytes in the authored token.
Definition FilePathPair.hpp:183
friend bool operator==(const FilePathPair &a, const char *s)
Compare authored tokens for exact-byte equality.
Definition FilePathPair.hpp:268
FilePathPair & operator=(const char *s)
Copy a new authored token and clear cached absolute resolution.
Definition FilePathPair.hpp:159
const std::string & str() const noexcept
Borrow the complete authored token.
Definition FilePathPair.hpp:193
friend bool operator==(const std::string &s, const FilePathPair &a)
Compare authored tokens for exact-byte equality.
Definition FilePathPair.hpp:238
bool empty() const noexcept
Test whether the authored token is empty.
Definition FilePathPair.hpp:178
std::string original
Definition FilePathPair.hpp:65
FilePathPair(const char *s)
Copy a token into original and leave the resolved cache empty.
Definition FilePathPair.hpp:120
const char * c_str() const noexcept
Borrow a NUL-terminated view of the authored token.
Definition FilePathPair.hpp:188
friend bool operator!=(const std::string &s, const FilePathPair &a)
Compare authored tokens for exact-byte inequality.
Definition FilePathPair.hpp:258
FilePathPair(std::string &&s) noexcept
Move a token into original and leave the resolved cache empty.
Definition FilePathPair.hpp:112
FilePathPair & operator=(const std::string &s)
Copy a new authored token and clear cached absolute resolution.
Definition FilePathPair.hpp:133
friend bool operator!=(const FilePathPair &a, const std::string &s)
Compare authored tokens for exact-byte inequality.
Definition FilePathPair.hpp:248
friend bool operator==(const FilePathPair &a, const FilePathPair &b)
Compare authored tokens for exact-byte equality.
Definition FilePathPair.hpp:206
std::string absolute
Definition FilePathPair.hpp:64
friend bool operator==(const char *s, const FilePathPair &a)
Compare authored tokens for exact-byte equality.
Definition FilePathPair.hpp:280
friend bool operator!=(const FilePathPair &a, const FilePathPair &b)
Compare authored tokens for exact-byte inequality.
Definition FilePathPair.hpp:218
friend bool operator==(const FilePathPair &a, const std::string &s)
Compare authored tokens for exact-byte equality.
Definition FilePathPair.hpp:228
friend bool operator!=(const char *s, const FilePathPair &a)
Compare authored tokens for exact-byte inequality.
Definition FilePathPair.hpp:300
FilePathPair & operator=(std::string &&s) noexcept
Move a new authored token and clear cached absolute resolution.
Definition FilePathPair.hpp:146
FilePathPair()=default
Create an empty authored token and empty resolved-path cache.
FilePathPair(const FilePathPair &)=default
Copy the authored token and resolved absolute cache from another pair.