construct::ui::ValidationPresenter::Input

One validation fact for ValidationPresenter::apply().

Declared in src/libs/libconstruct/construct/ui/ValidationPresenter.hpp
Group construct

Detailed description

Make an input with pending(), unavailable(), result() or fromValidationResult(). The counts are read only for a Result.

Member type documentation

Kind enum

enum Input::Kind

The kind of the fact.

Constant Value Description
construct::ui::ValidationPresenter::Input::Kind::Pending 0 A validation started.
construct::ui::ValidationPresenter::Input::Kind::Unavailable 1 No validator ran.
construct::ui::ValidationPresenter::Input::Kind::Result 2 A validation finished with the counts of the input.

Member function documentation

fromValidationResult

[static] construct::ui::ValidationPresenter::Input Input::fromValidationResult(const construct::shader::ValidationResult &result)

Returns the input for a shader validation result.

Each error diagnostic counts as one error, and each warning diagnostic as one warning. An info diagnostic counts as neither. A result that failed with no error diagnostic counts as one error, so a failed compile never shows as OK.

result is the result of ShaderValidator, or of the batch path after it converts its map to this type.

Returns an input of kind Result.

pending

[static] construct::ui::ValidationPresenter::Input Input::pending()

Returns the input for a validation that started.

Returns an input of kind Pending.

result

[static] construct::ui::ValidationPresenter::Input Input::result(int errorCount, int warningCount)

Returns the input for a validation result.

errorCount is the number of errors in the result, and warningCount is the number of warnings. A negative count is read as zero.

Returns an input of kind Result.

unavailable

[static] construct::ui::ValidationPresenter::Input Input::unavailable()

Returns the input for a definition that no validator checked.

Returns an input of kind Unavailable.