Two-string carrier for any external file path that appears in a SWMM .inp file.
More...
#include <FilePathPair.hpp>
|
| | 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.
|
| |
| | FilePathPair (FilePathPair &&) noexcept=default |
| | Move the authored token and resolved cache from another pair.
|
| |
| FilePathPair & | operator= (const FilePathPair &)=default |
| | Copy both owned path strings from another pair.
|
| |
| FilePathPair & | operator= (FilePathPair &&) noexcept=default |
| | Move both owned path strings from another pair.
|
| |
| | FilePathPair (const std::string &s) |
| | Copy a token into original and leave the resolved cache empty.
|
| |
| | FilePathPair (std::string &&s) noexcept |
| | Move a token into original and leave the resolved cache empty.
|
| |
| | FilePathPair (const char *s) |
| | Copy a token into original and leave the resolved cache empty.
|
| |
| FilePathPair & | operator= (const std::string &s) |
| | Copy a new authored token and clear cached absolute resolution.
|
| |
| FilePathPair & | operator= (std::string &&s) noexcept |
| | Move a new authored token and clear cached absolute resolution.
|
| |
| FilePathPair & | operator= (const char *s) |
| | Copy a new authored token and clear cached absolute resolution.
|
| |
| | operator const std::string & () const noexcept |
| | Borrow the authored token through implicit string conversion.
|
| |
| bool | empty () const noexcept |
| | Test whether the authored token is empty.
|
| |
| std::size_t | size () const noexcept |
| | Count bytes in the authored token.
|
| |
| const char * | c_str () const noexcept |
| | Borrow a NUL-terminated view of the authored token.
|
| |
| const std::string & | str () const noexcept |
| | Borrow the complete authored token.
|
| |
|
| bool | operator== (const FilePathPair &a, const FilePathPair &b) |
| | Compare authored tokens for exact-byte equality.
|
| |
| bool | operator!= (const FilePathPair &a, const FilePathPair &b) |
| | Compare authored tokens for exact-byte inequality.
|
| |
| bool | operator== (const FilePathPair &a, const std::string &s) |
| | Compare authored tokens for exact-byte equality.
|
| |
| bool | operator== (const std::string &s, const FilePathPair &a) |
| | Compare authored tokens for exact-byte equality.
|
| |
| bool | operator!= (const FilePathPair &a, const std::string &s) |
| | Compare authored tokens for exact-byte inequality.
|
| |
| bool | operator!= (const std::string &s, const FilePathPair &a) |
| | Compare authored tokens for exact-byte inequality.
|
| |
| bool | operator== (const FilePathPair &a, const char *s) |
| | Compare authored tokens for exact-byte equality.
|
| |
| bool | operator== (const char *s, const FilePathPair &a) |
| | Compare authored tokens for exact-byte equality.
|
| |
| bool | operator!= (const FilePathPair &a, const char *s) |
| | Compare authored tokens for exact-byte inequality.
|
| |
| bool | operator!= (const char *s, const FilePathPair &a) |
| | Compare authored tokens for exact-byte inequality.
|
| |
Two-string carrier for any external file path that appears in a SWMM .inp file.
Each slot carries:
absolute: resolved absolute path, ready for fopen(). Filled by PostParseResolver after read; empty for programmatic models until a path-set call runs.
original: verbatim token as it appeared in the source .inp file (relative or absolute, with whichever separators the author used). Empty for models that were not loaded from an .inp.
Slice IO-2 keeps every existing caller working through an implicit std::string surface that targets original. Slice IO-3 wires PostParseResolver to populate absolute; Slice IO-4 wires the writer to rebase original against the destination directory.
◆ FilePathPair() [1/6]
| openswmm::FilePathPair::FilePathPair |
( |
| ) |
|
|
default |
Create an empty authored token and empty resolved-path cache.
◆ FilePathPair() [2/6]
| openswmm::FilePathPair::FilePathPair |
( |
const FilePathPair & | | ) |
|
|
default |
Copy the authored token and resolved absolute cache from another pair.
Both strings become independently owned copies; no path resolution or filesystem access occurs.
◆ FilePathPair() [3/6]
Move the authored token and resolved cache from another pair.
Source remains valid with unspecified string contents. Does not resolve/check either path.
◆ FilePathPair() [4/6]
| openswmm::FilePathPair::FilePathPair |
( |
const std::string & | s | ) |
|
|
inline |
Copy a token into original and leave the resolved cache empty.
Does not resolve, normalize, validate or open the path.
- Parameters
-
| [in] | s | Borrowed authored path token, copied verbatim including embedded NUL bytes. |
◆ FilePathPair() [5/6]
| openswmm::FilePathPair::FilePathPair |
( |
std::string && | s | ) |
|
|
inlinenoexcept |
Move a token into original and leave the resolved cache empty.
Does not resolve, normalize, validate or open the path.
- Parameters
-
| [in] | s | Token moved into original; source remains valid with unspecified contents. |
◆ FilePathPair() [6/6]
| openswmm::FilePathPair::FilePathPair |
( |
const char * | s | ) |
|
|
inline |
Copy a token into original and leave the resolved cache empty.
Does not resolve, normalize, validate or open the path.
- Parameters
-
| [in] | s | Borrowed NUL-terminated token; NULL is treated as empty. |
◆ c_str()
| const char * openswmm::FilePathPair::c_str |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Borrow a NUL-terminated view of the authored token.
- Returns
- original.c_str(); do not free, and copy before token modification or pair destruction.
◆ empty()
| bool openswmm::FilePathPair::empty |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Test whether the authored token is empty.
- Returns
- original.empty(); ignores whether absolute has been populated.
◆ operator const std::string &()
| openswmm::FilePathPair::operator const std::string & |
( |
| ) |
const |
|
inlinenoexcept |
Borrow the authored token through implicit string conversion.
- Returns
- Reference to original, not absolute; valid until token modification or pair destruction.
◆ operator=() [1/5]
| FilePathPair & openswmm::FilePathPair::operator= |
( |
const char * | s | ) |
|
|
inline |
Copy a new authored token and clear cached absolute resolution.
Caller must resolve the new token explicitly before relying on absolute.
- Parameters
-
| [in] | s | Borrowed NUL-terminated token; NULL is treated as empty. |
- Returns
- Reference to this pair; previous borrowed token/cache views may be invalidated.
◆ operator=() [2/5]
Copy both owned path strings from another pair.
- Returns
- Reference to this pair; old string views may be invalidated.
◆ operator=() [3/5]
| FilePathPair & openswmm::FilePathPair::operator= |
( |
const std::string & | s | ) |
|
|
inline |
Copy a new authored token and clear cached absolute resolution.
Caller must resolve the new token explicitly before relying on absolute.
- Parameters
-
| [in] | s | Borrowed authored path token, copied verbatim including embedded NUL bytes. |
- Returns
- Reference to this pair; previous borrowed token/cache views may be invalidated.
◆ operator=() [4/5]
Move both owned path strings from another pair.
- Returns
- Reference to this pair; source remains valid with unspecified string contents.
◆ operator=() [5/5]
| FilePathPair & openswmm::FilePathPair::operator= |
( |
std::string && | s | ) |
|
|
inlinenoexcept |
Move a new authored token and clear cached absolute resolution.
Caller must resolve the new token explicitly before relying on absolute.
- Parameters
-
| [in] | s | Token moved into original; source remains valid with unspecified contents. |
- Returns
- Reference to this pair; previous borrowed token/cache views may be invalidated.
◆ size()
| std::size_t openswmm::FilePathPair::size |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Count bytes in the authored token.
- Returns
- original.size(), excluding the terminating NUL and including any embedded NUL bytes.
◆ str()
| const std::string & openswmm::FilePathPair::str |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Borrow the complete authored token.
- Returns
- Reference to original; absolute cache is not consulted.
◆ operator!= [1/5]
Compare authored tokens for exact-byte inequality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | s | Borrowed NUL-terminated token; NULL compares as the empty token. |
| [in] | a | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are different.
◆ operator!= [2/5]
Compare authored tokens for exact-byte inequality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | s | Borrowed NUL-terminated token; NULL compares as the empty token. |
- Returns
- True when the authored tokens are different.
◆ operator!= [3/5]
Compare authored tokens for exact-byte inequality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | b | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are different.
◆ operator!= [4/5]
| bool operator!= |
( |
const FilePathPair & | a, |
|
|
const std::string & | s ) |
|
friend |
Compare authored tokens for exact-byte inequality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | s | Borrowed exact-byte token, including embedded NUL bytes. |
- Returns
- True when the authored tokens are different.
◆ operator!= [5/5]
| bool operator!= |
( |
const std::string & | s, |
|
|
const FilePathPair & | a ) |
|
friend |
Compare authored tokens for exact-byte inequality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | s | Borrowed exact-byte token, including embedded NUL bytes. |
| [in] | a | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are different.
◆ operator== [1/5]
Compare authored tokens for exact-byte equality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | s | Borrowed NUL-terminated token; NULL compares as the empty token. |
| [in] | a | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are equal.
◆ operator== [2/5]
Compare authored tokens for exact-byte equality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | s | Borrowed NUL-terminated token; NULL compares as the empty token. |
- Returns
- True when the authored tokens are equal.
◆ operator== [3/5]
Compare authored tokens for exact-byte equality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | b | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are equal.
◆ operator== [4/5]
| bool operator== |
( |
const FilePathPair & | a, |
|
|
const std::string & | s ) |
|
friend |
Compare authored tokens for exact-byte equality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | a | Borrowed pair; only original participates, never absolute. |
| [in] | s | Borrowed exact-byte token, including embedded NUL bytes. |
- Returns
- True when the authored tokens are equal.
◆ operator== [5/5]
| bool operator== |
( |
const std::string & | s, |
|
|
const FilePathPair & | a ) |
|
friend |
Compare authored tokens for exact-byte equality.
No case folding, path normalization, filesystem lookup or resolved-cache comparison is performed.
- Parameters
-
| [in] | s | Borrowed exact-byte token, including embedded NUL bytes. |
| [in] | a | Borrowed pair; only original participates, never absolute. |
- Returns
- True when the authored tokens are equal.
◆ absolute
| std::string openswmm::FilePathPair::absolute |
◆ original
| std::string openswmm::FilePathPair::original |
The documentation for this struct was generated from the following file:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/core/FilePathPair.hpp