|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The development inspector over one mounted screen: its mounted nodes, its queries and mutations, the command lists it ran, and the reactive runtime's counters. More...
#include <inspector.hpp>
Public Member Functions | |
| std::string const & | screenId () const noexcept |
| The screen's document id. | |
| std::vector< InspectedNode > | nodes () const |
| Every node of the screen whose scope is alive, in the order it was lowered (a parent before its children), each with its expression properties evaluated now. | |
| std::vector< InspectedQuery > | queries () const |
| Every query and mutation of the screen's live scopes, the screen's own first, then those of the app document, with their state now. | |
| std::vector< CommandLogEntry > | commandLog () const |
| The latest command lists the screen ran, oldest first, at most detail::kCommandLogSize. | |
| reactive::RuntimeStats | counters () const |
| The reactive runtime's counters: flushes, Effects per flush, batches and misuses. | |
| bool | refetch (std::string_view query) |
| Refetches a query by running the document command {"refetch": "<query>"} in the scope that declares it, as a user's event runs a command list: the same path, the same batch, the same log entry. | |
Static Public Member Functions | |
| static std::optional< Inspector > | over (Screen &screen) |
An inspector over screen, when its session records what an inspector reads. | |
The development inspector over one mounted screen: its mounted nodes, its queries and mutations, the command lists it ran, and the reactive runtime's counters.
Every read returns a copy, so nothing it hands out writes the screen. The one thing it does to the screen is refetch, which runs the document command {"refetch": "<query>"} as a user's event would. Valid while the screen lives; use it on the runtime's owner.
Definition at line 70 of file inspector.hpp.
|
inlinestaticnodiscard |
An inspector over screen, when its session records what an inspector reads.
| screen | The screen; it outlives the inspector. |
Definition at line 75 of file inspector.hpp.
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
Every node of the screen whose scope is alive, in the order it was lowered (a parent before its children), each with its expression properties evaluated now.
A node is listed once per scope it was lowered in, so a row's nodes are listed once per row. A switch's default and a custom node's fallback are lowered in their enclosing scope, so they are listed whether or not they are shown. An evaluation the inspector makes reports no diagnostic.
Definition at line 93 of file inspector.hpp.
|
inlinenodiscard |
Every query and mutation of the screen's live scopes, the screen's own first, then those of the app document, with their state now.
A query is idle with no cache entry (its when is not true, its alias is unbound or its body is null), and with an entry that has neither a value nor a request; pending while a request is in flight; error when the last request failed; stale when its entry was invalidated or its value is at least staleTime old; fresh otherwise. A mutation is pending while a run is in flight or queued, error when its last run failed, fresh once a run succeeded, and idle before any.
Definition at line 128 of file inspector.hpp.
|
inlinenodiscard |
The latest command lists the screen ran, oldest first, at most detail::kCommandLogSize.
Definition at line 144 of file inspector.hpp.
|
inlinenodiscard |
The reactive runtime's counters: flushes, Effects per flush, batches and misuses.
Definition at line 151 of file inspector.hpp.
|
inline |
Refetches a query by running the document command {"refetch": "<query>"} in the scope that declares it, as a user's event runs a command list: the same path, the same batch, the same log entry.
| query | The query's name, as queries() lists it. |
Definition at line 157 of file inspector.hpp.