UI-owned source connecting immutable providers and scoped ranges to a real WidgetTree. The tree must outlive the source; use a long-lived context when views are disposable. Publisher and request tokens may outlive source/tree/scheduler. Read one pin per model per frame. Scheduler dispatch and source mutation belong between frames.
More...
#include <model.hpp>
|
|
| ~Model () |
| | Close publication delivery on UI, without waiting for worker ownership.
|
|
| Model (const Model &)=delete |
|
Model & | operator= (const Model &)=delete |
| Publisher< ModelSnapshot< T > > | publisher () const |
| | Copy worker-safe full snapshot endpoint on UI.
|
| std::expected< ModelFrame< T >, TreeError > | pin () const |
| | Capture one immutable frame owner on UI; never reads provider ranges or copies rows.
|
| std::expected< ModelConsumer< T >, TreeError > | openRange () |
| | Register one independent consumer; NODE_LIMIT reports its finite capacity.
|
| std::expected< std::optional< TreeError >, TreeError > | lastError () const |
| | Last UI application failure; queue acceptance alone is not proof of application.
|
|
|
class | ManagedScene |
|
struct | ui::detail::EditAccess |
template<class T>
class portals::Model< T >
UI-owned source connecting immutable providers and scoped ranges to a real WidgetTree. The tree must outlive the source; use a long-lived context when views are disposable. Publisher and request tokens may outlive source/tree/scheduler. Read one pin per model per frame. Scheduler dispatch and source mutation belong between frames.
- Template Parameters
-
| T | Domain row value type; snapshot-owned reachable data must remain immutable and support destruction on the final owner's thread. Library range/frame/request operations do not copy T values. |
◆ create()
Create two bounded Scheduler endpoints in the context's scope; initial snapshot is required.
- Parameters
-
| tree | Borrowed UI-owned tree and scheduler that must outlive the source. |
| context | Live node whose scope owns the endpoints and whose layout is invalidated on publication. |
| initial | Non-null immutable provider snapshot retained as the initial base revision. |
| options | Positive independent row, consumer and in-flight-work limits. |
- Returns
- New source; INVALID_ARGUMENT for null/invalid limits, tree/scheduler errors, IDENTITY_EXHAUSTED, or NO_MEMORY on failure without a source.
◆ lastError()
Last UI application failure; queue acceptance alone is not proof of application.
- Returns
- Sticky UI application error, an empty optional before any such failure, or WRONG_THREAD.
◆ openRange()
Register one independent consumer; NODE_LIMIT reports its finite capacity.
- Returns
- Independent UI-owned consumer; tree/frame errors, closed, NODE_LIMIT, IDENTITY_EXHAUSTED, or NO_MEMORY.
◆ pin()
Capture one immutable frame owner on UI; never reads provider ranges or copies rows.
- Returns
- Immutable base snapshot/consumer table owner, or WRONG_THREAD. Existing pins survive later publications.
◆ publisher()
Copy worker-safe full snapshot endpoint on UI.
- Returns
- Copied endpoint for strictly newer immutable provider snapshots; acceptance does not imply application.
The documentation for this class was generated from the following file: