One immutable model revision retained by the frame owner for all its views. Obtain once before WidgetTree::frame, pass the same value to every view, and retain it until borrowed rendering finishes. Different models require application transactions.
More...
#include <model.hpp>
|
| | ModelFrame (const ModelFrame &other)=default |
| | Retain the same immutable ownership.
|
| | ModelFrame (ModelFrame &&other) noexcept=default |
| | Transfer ownership without releasing old storage.
|
| ModelFrame & | operator= (ModelFrame other) noexcept |
| | Replace all fields before releasing old storage, whose destructor may reenter.
|
| std::uint64_t | revision () const noexcept |
| | UI publication revision, including range readiness.
|
| std::uint64_t | dataRevision () const noexcept |
| | Provider data revision.
|
| std::shared_ptr< const ModelSnapshot< T > > | snapshot () const noexcept |
| | Retain the immutable base source without reading rows or transferring this UI frame.
|
| std::uint64_t | rowCount () const noexcept |
| | Logical rows.
|
| std::expected< ModelRange< T >, TreeError > | range (ModelRangeId id) const |
| | Read a consumer's exact result; stale/foreign consumer returns STALE_NODE. No spatial merge.
|
| std::expected< ModelRange< T >, TreeError > | read (RowRange range) const |
| | Direct bounded read from the base snapshot, without asynchronous requests or overlays.
|
| std::expected< RowLookup, TreeError > | locateRow (RowId id) const |
| | Resolve identity against the same retained snapshot as this frame's base rows.
|
|
|
template<class> |
| class | Model |
|
template<class> |
| class | VirtualList |
|
template<class> |
| class | VirtualTable |
|
template<class> |
| class | Chart |
template<class T>
class portals::ModelFrame< T >
One immutable model revision retained by the frame owner for all its views. Obtain once before WidgetTree::frame, pass the same value to every view, and retain it until borrowed rendering finishes. Different models require application transactions.
- 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. |
◆ ModelFrame() [1/2]
Retain the same immutable ownership.
- Parameters
-
| other | Owner whose immutable storage and metadata are shared; domain rows are not copied. |
◆ ModelFrame() [2/2]
Transfer ownership without releasing old storage.
- Parameters
-
| other | Owner whose storage is transferred; do not read moved-from borrowed data. |
◆ dataRevision()
Provider data revision.
- Returns
- Provider data revision retained by this frame.
◆ locateRow()
Resolve identity against the same retained snapshot as this frame's base rows.
- Parameters
-
| id | Full nonzero row identity to locate; no ownership is transferred. |
- Returns
- Owning capability/result, INVALID_ARGUMENT for invalid identity/result or out-of-bounds index, NO_MEMORY for allocation failure, or CALLBACK_FAILED for other provider exceptions.
- Note
- UI preparation only, outside a tree frame. No requests or tree invalidation are performed.
◆ operator=()
Replace all fields before releasing old storage, whose destructor may reenter.
- Parameters
-
| other | Replacement owner passed by value; old storage is released after all fields are replaced. |
- Returns
- This owner; do not use the reference if reentrant destruction of old storage destroyed this object.
◆ range()
Read a consumer's exact result; stale/foreign consumer returns STALE_NODE. No spatial merge.
- Parameters
-
| id | Consumer identity looked up in this immutable table; older pins can retain retired consumers. |
- Returns
- That consumer's independent result owner, or STALE_NODE if absent from this table.
◆ read()
Direct bounded read from the base snapshot, without asynchronous requests or overlays.
- Parameters
-
| range | Interval read from the pinned base snapshot under this model's row limit. |
- Returns
- Independent range owner, INVALID_ARGUMENT for bounds/result shape, NO_MEMORY, or CALLBACK_FAILED.
◆ revision()
UI publication revision, including range readiness.
- Returns
- UI publication revision, including range request/readiness changes.
◆ rowCount()
Logical rows.
- Returns
- Logical row count of the pinned base snapshot.
◆ snapshot()
Retain the immutable base source without reading rows or transferring this UI frame.
- Returns
- Shared base snapshot owner; range-readiness overlays are not included. A worker may use ModelRange<T>::read with its own finite bounds. The provider snapshot, its reachable storage and final-owner destruction must satisfy ModelSnapshot<T>'s contract.
The documentation for this class was generated from the following file: