morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::forms::RowState Class Reference

One collection row: the element's member fields. More...

#include <form_session.hpp>

Public Member Functions

 RowState (detail::engine::SessionCore &core, FieldSpec const &arraySpec, std::string const &arrayPath, std::uint64_t key, FieldState const *parent)
 RowState (RowState const &)=delete
RowState & operator= (RowState const &)=delete
 RowState (RowState &&)=delete
RowState & operator= (RowState &&)=delete
std::uint64_t key () const noexcept
 The row's stable key (not its position).
std::span< std::unique_ptr< FieldState > const > fields () const noexcept
 The member fields, in x-order.
FieldState * field (std::string_view name) const noexcept
 A member by wire name.
bool blank () const
 Whether every member is blank. Tracked.
void start ()
 Starts every member; called once the row is built and loaded.

Detailed Description

One collection row: the element's member fields.

Definition at line 147 of file form_session.hpp.

Constructor & Destructor Documentation

◆ RowState()

morph::forms::RowState::RowState ( detail::engine::SessionCore & core,
FieldSpec const & arraySpec,
std::string const & arrayPath,
std::uint64_t key,
FieldState const * parent )
inline
Parameters
coreThe session core. Borrowed.
arraySpecThe collection field's spec (its children are the members).
arrayPathThe collection field's path.
keyThe row's stable key.
parentThe collection field.

Definition at line 728 of file form_session.hpp.

Member Function Documentation

◆ key()

std::uint64_t morph::forms::RowState::key ( ) const
inlinenodiscardnoexcept

The row's stable key (not its position).

Returns
The key.

Definition at line 164 of file form_session.hpp.

◆ fields()

std::span< std::unique_ptr< FieldState > const > morph::forms::RowState::fields ( ) const
inlinenodiscardnoexcept

The member fields, in x-order.

Returns
The fields.

Definition at line 168 of file form_session.hpp.

◆ field()

FieldState * morph::forms::RowState::field ( std::string_view name) const
inlinenodiscardnoexcept

A member by wire name.

Parameters
nameThe wire name.
Returns
The member, or null.

Definition at line 739 of file form_session.hpp.

◆ blank()

bool morph::forms::RowState::blank ( ) const
inlinenodiscard

Whether every member is blank. Tracked.

Returns
true when nothing is entered in the row.

Definition at line 744 of file form_session.hpp.

◆ start()

void morph::forms::RowState::start ( )
inline

Starts every member; called once the row is built and loaded.

Definition at line 748 of file form_session.hpp.


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