SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::serialize::detail Namespace Reference

Typedefs

template<typename Model>
using ResolvedEquations = decltype(model::resolve_equilibrium_equations(std::declval<const Model&>()))
 
template<typename Model>
using OwnedEquations
 

Functions

Result< std::optional< equations::PointMassCompanion > > read_companion (const Node &node)
 Archives written before companions existed have no companion field; a single star stays one.
 
Node with_companion (Node node, const std::optional< equations::PointMassCompanion > &companion)
 Record the companion only when there is one, so single-star archives keep their schema.
 
std::uint64_t value_count (const Value &value)
 Scalar types have one value; numerical arrays and strings carry their explicit extent.
 
std::string encode_value (const Value &value, Format format)
 Encode one indexed payload without relying on native object layout or byte order.
 
Result< Value > decode_value (std::string_view bytes, const Entry &entry, Format format)
 Validate the extent and representation of an independently read payload.
 
bool valid_path (std::string_view path)
 Restrict field names so path separators and line breaks cannot corrupt the ledger.
 
Node provenance (const WriteOptions &options)
 Capture provenance once at the beginning of a write.
 

Variables

constexpr std::uint64_t header_bytes = 512
 

Typedef Documentation

◆ OwnedEquations

template<typename Model>
using serif::utils::serialize::detail::OwnedEquations
Initial value:
decltype(model::resolve_equilibrium_equations(std::declval< const Model & >())) ResolvedEquations
Definition model.hpp:190
State the chosen equations explicitly, without selecting physics from the EOS.
Definition equilibrium_equations.hpp:23

◆ ResolvedEquations

template<typename Model>
using serif::utils::serialize::detail::ResolvedEquations = decltype(model::resolve_equilibrium_equations(std::declval<const Model&>()))

Function Documentation

◆ decode_value()

Result< Value > serif::utils::serialize::detail::decode_value ( std::string_view bytes,
const Entry & entry,
Format format )
nodiscard

Validate the extent and representation of an independently read payload.

◆ encode_value()

std::string serif::utils::serialize::detail::encode_value ( const Value & value,
Format format )
nodiscard

Encode one indexed payload without relying on native object layout or byte order.

Emit one numerical value through the selected representation.

◆ provenance()

Node serif::utils::serialize::detail::provenance ( const WriteOptions & options)
nodiscard

Capture provenance once at the beginning of a write.

◆ read_companion()

Result< std::optional< equations::PointMassCompanion > > serif::utils::serialize::detail::read_companion ( const Node & node)
inlinenodiscard

Archives written before companions existed have no companion field; a single star stays one.

◆ valid_path()

bool serif::utils::serialize::detail::valid_path ( std::string_view path)
nodiscard

Restrict field names so path separators and line breaks cannot corrupt the ledger.

◆ value_count()

std::uint64_t serif::utils::serialize::detail::value_count ( const Value & value)
nodiscard

Scalar types have one value; numerical arrays and strings carry their explicit extent.

◆ with_companion()

Node serif::utils::serialize::detail::with_companion ( Node node,
const std::optional< equations::PointMassCompanion > & companion )
inline

Record the companion only when there is one, so single-star archives keep their schema.

Variable Documentation

◆ header_bytes

std::uint64_t serif::utils::serialize::detail::header_bytes = 512
inlineconstexpr