SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
archive.hpp File Reference
#include <cstddef>
#include <filesystem>
#include <fstream>
#include <map>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "serif/utils/serialize/record.hpp"
Include dependency graph for archive.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  serif::utils::serialize::WriteOptions
 Annotations belong to the written observation, not to the stellar physics. More...
 
struct  serif::utils::serialize::ReadOptions
 Bound resource use when inspecting an unfamiliar archive; limits may be raised explicitly. More...
 
struct  serif::utils::serialize::Entry
 The ledger locates each independent field without decoding the rest of the archive. More...
 
struct  serif::utils::serialize::Pack
 A pack owns its data immediately, so subsequent model changes cannot alter a pending write. More...
 
class  serif::utils::serialize::Reader
 Inspect the ledger first, then seek directly to whichever components are actually needed. More...
 

Namespaces

namespace  serif
 
namespace  serif::utils
 
namespace  serif::utils::serialize
 

Enumerations

enum class  serif::utils::serialize::Format { serif::utils::serialize::binary , serif::utils::serialize::text }
 Both encodings share the same component schemas and indexed, sectioned file layout. More...
 
enum class  serif::utils::serialize::VersionTolerance { serif::utils::serialize::same_major , serif::utils::serialize::exact , serif::utils::serialize::any }
 Application-version compatibility is separate from file-format and component-schema compatibility. More...
 

Functions

template<typename T>
Field serif::utils::serialize::named (std::string name, const T &value)
 Assign an explicit top-level name, for example when storing two stars in the same archive.
 
void serif::utils::serialize::add_component (Pack &pack, Field component)
 Insert a component while rejecting conflicting definitions of the same named object.
 
template<typename... T>
Pack serif::utils::serialize::pack (const T &... values)
 Capture every supplied component; unregistered nested types remain visible as unsupported entries.
 
Result< void > serif::utils::serialize::write (const std::filesystem::path &path, const Pack &contents, const WriteOptions &options={})
 Write a complete temporary file and atomically replace the destination only after it closes successfully.