SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::serialize::EnumSerializer< T > Struct Template Reference

Encode enumerations by declared stable spellings, never compiler-dependent integers. More...

#include <components.hpp>

Static Public Member Functions

static Node save (T value)
 Look up the explicitly registered scientific or numerical choice.
 
static Result< T > load (const Node &node)
 Reject unknown choices instead of silently selecting a default.
 

Detailed Description

template<typename T>
struct serif::utils::serialize::EnumSerializer< T >

Encode enumerations by declared stable spellings, never compiler-dependent integers.

Member Function Documentation

◆ load()

template<typename T>
static Result< T > serif::utils::serialize::EnumSerializer< T >::load ( const Node & node)
inlinestaticnodiscard

Reject unknown choices instead of silently selecting a default.

◆ save()

template<typename T>
static Node serif::utils::serialize::EnumSerializer< T >::save ( T value)
inlinestaticnodiscard

Look up the explicitly registered scientific or numerical choice.


The documentation for this struct was generated from the following file: