#include <CheckpointFile.hpp>
|
| std::string | encode () const |
| | Serialize this companion's path, length and fingerprint contract.
|
| |
| void | verify () const |
| | Check the named companion's exact size and fingerprint.
|
| |
Internal immutable output companion. Integrity detects accidental damage, not malicious edits. Physical/model archives remain independently validated.
◆ decode()
| CheckpointFile openswmm::io::CheckpointFile::decode |
( |
std::string | bytes | ) |
|
|
static |
Decode and validate a versioned companion-file contract.
- Parameters
-
| [in] | bytes | Owned binary archive, consumed by value; size must be less than 16384 bytes and the encoded UTF-8 path less than 8192 bytes. |
- Returns
- Contract with a nonempty path and byte count in [1, INT64_MAX].
- Exceptions
-
| std::runtime_error | Version, endian marker, field bounds or archive shape is invalid. Archive decoding exceptions may also propagate. |
- Note
- This validates metadata only; call verify() to inspect file contents.
◆ encode()
| std::string openswmm::io::CheckpointFile::encode |
( |
| ) |
const |
Serialize this companion's path, length and fingerprint contract.
- Returns
- Newly owned binary archive containing version 1, endian marker, UTF-8 path, byte count and FNV-1a fingerprint; no file data is embedded.
- Note
- Does not validate the fields or read the companion file.
◆ verify()
| void openswmm::io::CheckpointFile::verify |
( |
| ) |
const |
Check the named companion's exact size and fingerprint.
- Exceptions
-
| std::runtime_error | The path is not a non-symlink regular file, is unreadable, has changed length or has a different FNV-1a fingerprint. Filesystem inspection errors may also propagate. |
- Note
- Uses a fixed 64 KiB read buffer. This detects accidental damage; it is not cryptographic authentication and does not lock the file.
◆ bytes
| uint64_t openswmm::io::CheckpointFile::bytes = 0 |
◆ fingerprint
| uint64_t openswmm::io::CheckpointFile::fingerprint = 0 |
◆ path
| std::filesystem::path openswmm::io::CheckpointFile::path |
The documentation for this struct was generated from the following files: