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

Handles UI input validation. More...

#include <InputValidator.hpp>

Collaboration diagram for correlation::app::InputValidator:

Public Member Functions

 InputValidator (::AppWindow &window, AppController &controller)
 Constructs the InputValidator.
bool validateInputs ()
 Validates all numeric input fields and pushes error states to the UI.

Private Member Functions

bool validateFrames (const AnalysisOptions &opts, AppErrors &errs)
 Validates trajectory frame indexing bounds.
bool validateExportConfig (AppErrors &errs)
 Validates plot export layout settings.

Static Private Member Functions

static bool validateRadialAndScattering (const AnalysisOptions &opts, AppErrors &errs, float &r_max_val, float &q_max_val)
 Validates radial distribution and scattering options.
static bool validateXrdOptions (const AnalysisOptions &opts, AppErrors &errs)
 Validates powder X-ray diffraction options.
static bool validateAngularAndRings (const AnalysisOptions &opts, AppErrors &errs)
 Validates angular and ring distribution options.
static bool validateOtherAnalysisOptions (const AnalysisOptions &opts, AppErrors &errs)
 Validates Local Entropy and Hyperuniformity parameters.

Private Attributes

::AppWindow * window_
AppController * controller_

Detailed Description

Handles UI input validation.

Constructor & Destructor Documentation

◆ InputValidator()

correlation::app::InputValidator::InputValidator ( ::AppWindow & window,
AppController & controller )

Constructs the InputValidator.

Parameters
[in,out]windowReference to the UI window.
[in,out]controllerReference to the main AppController.

Member Function Documentation

◆ validateAngularAndRings()

bool correlation::app::InputValidator::validateAngularAndRings ( const AnalysisOptions & opts,
AppErrors & errs )
staticnodiscardprivate

Validates angular and ring distribution options.

Parameters
[in]optsAnalysis options from the UI.
[out]errsAppErrors structure for reporting invalid field states.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateExportConfig()

bool correlation::app::InputValidator::validateExportConfig ( AppErrors & errs)
nodiscardprivate

Validates plot export layout settings.

Parameters
[out]errsAppErrors structure for reporting invalid field states.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateFrames()

bool correlation::app::InputValidator::validateFrames ( const AnalysisOptions & opts,
AppErrors & errs )
nodiscardprivate

Validates trajectory frame indexing bounds.

Parameters
[in]optsAnalysis options from the UI.
[out]errsAppErrors structure for reporting invalid field states.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateInputs()

bool correlation::app::InputValidator::validateInputs ( )
nodiscard

Validates all numeric input fields and pushes error states to the UI.

Returns
true if all inputs are valid, false otherwise.
Here is the call graph for this function:

◆ validateOtherAnalysisOptions()

bool correlation::app::InputValidator::validateOtherAnalysisOptions ( const AnalysisOptions & opts,
AppErrors & errs )
staticnodiscardprivate

Validates Local Entropy and Hyperuniformity parameters.

Parameters
[in]optsAnalysis options from the UI.
[out]errsAppErrors structure for reporting invalid field states.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateRadialAndScattering()

bool correlation::app::InputValidator::validateRadialAndScattering ( const AnalysisOptions & opts,
AppErrors & errs,
float & r_max_val,
float & q_max_val )
staticnodiscardprivate

Validates radial distribution and scattering options.

Parameters
[in]optsAnalysis options from the UI.
[out]errsAppErrors structure for reporting invalid field states.
[out]r_max_valEvaluated maximum radial cutoff.
[out]q_max_valEvaluated maximum reciprocal space momentum.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateXrdOptions()

bool correlation::app::InputValidator::validateXrdOptions ( const AnalysisOptions & opts,
AppErrors & errs )
staticnodiscardprivate

Validates powder X-ray diffraction options.

Parameters
[in]optsAnalysis options from the UI.
[out]errsAppErrors structure for reporting invalid field states.
Returns
true if valid, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ controller_

AppController* correlation::app::InputValidator::controller_
private

◆ window_

::AppWindow* correlation::app::InputValidator::window_
private

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