Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::app::OptionsSyncService Class Reference

Stateless bidirectional synchronization between ProgramOptions and UI analysis models. More...

#include <OptionsSyncService.hpp>

Static Public Member Functions

static std::expected< ProgramOptions, std::string > readFromUI (const AppWindow &window, size_t frame_count, const correlation::analysis::BondCutoffMatrix &bond_cutoffs={})
 Reads and validates analysis options from the UI window into a ProgramOptions struct.
static void writeToUI (AppWindow &window, const ProgramOptions &options)
 Writes ProgramOptions fields to the target UI window.
static void updateActiveGroupFlags (AppWindow &window, const ProgramOptions &opts, const correlation::calculators::ICalculatorRegistry *registry=nullptr)
 Updates boolean UI visibility/active flags for calculator groups.

Detailed Description

Stateless bidirectional synchronization between ProgramOptions and UI analysis models.

Member Function Documentation

◆ readFromUI()

std::expected< ProgramOptions, std::string > correlation::app::OptionsSyncService::readFromUI ( const AppWindow & window,
size_t frame_count,
const correlation::analysis::BondCutoffMatrix & bond_cutoffs = {} )
staticnodiscard

Reads and validates analysis options from the UI window into a ProgramOptions struct.

Parameters
[in]windowSource UI window.
[in]frame_countTotal available frames in loaded trajectory.
[in]bond_cutoffsActive bond cutoff matrix to attach.
Returns
Parsed and validated ProgramOptions on success, or an error string on failure.
Here is the caller graph for this function:

◆ updateActiveGroupFlags()

void correlation::app::OptionsSyncService::updateActiveGroupFlags ( AppWindow & window,
const ProgramOptions & opts,
const correlation::calculators::ICalculatorRegistry * registry = nullptr )
static

Updates boolean UI visibility/active flags for calculator groups.

Parameters
[in,out]windowTarget UI window.
[in]optsSource program options containing active calculators.
[in]registryInjected calculator registry for metadata queries.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeToUI()

void correlation::app::OptionsSyncService::writeToUI ( AppWindow & window,
const ProgramOptions & options )
static

Writes ProgramOptions fields to the target UI window.

Parameters
[in,out]windowTarget UI window.
[in]optionsSource program options to serialize.
Here is the call graph for this function:
Here is the caller graph for this function:

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