Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::NumericState Class Reference

Weak checked numeric source over the existing scene-owned Property runtime. Copies own no scene/widget. All reads and writes are UI-affine; saved snapshots are independent. More...

#include <managed.hpp>

Public Member Functions

 NumericState ()=default
 Create an empty handle whose operations return CLOSED.
std::expected< std::shared_ptr< const PropertyChange< NumericValue > >, ManagedError > snapshot () const
std::expected< PropertyUpdate< NumericValue >, ManagedError > set (double candidate) const
std::expected< PropertyUpdate< NumericValue >, ManagedError > configure (double initial, NumericRange range) const

Friends

class ManagedScene

Detailed Description

Weak checked numeric source over the existing scene-owned Property runtime. Copies own no scene/widget. All reads and writes are UI-affine; saved snapshots are independent.

Member Function Documentation

◆ configure()

std::expected< PropertyUpdate< NumericValue >, ManagedError > portals::NumericState::configure ( double initial,
NumericRange range ) const
Parameters
initialExplicit new finite value in the complete new range; never clamped.
rangeOrdered finite bounds and positive representable user increment.
Returns
Exact atomic value/range receipt or typed failure leaving the whole source unchanged.

◆ set()

std::expected< PropertyUpdate< NumericValue >, ManagedError > portals::NumericState::set ( double candidate) const
Parameters
candidateFinite in-range value, never rounded to the user step grid.
Returns
Exact Property receipt or typed numeric/access failure without a commit.

◆ snapshot()

std::expected< std::shared_ptr< const PropertyChange< NumericValue > >, ManagedError > portals::NumericState::snapshot ( ) const
Returns
Owning immutable value/range/revision or the original typed access failure.

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