ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::pipeline::StageResult Struct Reference

Outcome of one stage execution. More...

#include <stages.hpp>

Collaboration diagram for reusex::pipeline::StageResult:

Static Public Member Functions

static StageResult success (std::string message={})
static StageResult success (std::string message, std::vector< StageArtifact > outputs)
static StageResult failure (std::string message)
static StageResult invalid (std::string message)
static StageResult cancel (std::string message="cancelled")

Public Attributes

bool ok = false
 The stage completed and wrote its outputs.
bool cancelled = false
 The stage stopped early on a cancel request.
bool invalid_input = false
 The request was refused before/without doing the work because an input or a parameter was invalid, as opposed to the stage failing part-way through.
std::string message
 Human-readable summary or failure reason.
std::vector< StageArtifactoutputs
 What this run actually wrote.

Detailed Description

Outcome of one stage execution.

Definition at line 88 of file stages.hpp.

Member Function Documentation

◆ cancel()

StageResult reusex::pipeline::StageResult::cancel ( std::string message = "cancelled")
static

References message.

◆ failure()

StageResult reusex::pipeline::StageResult::failure ( std::string message)
static

References message.

◆ invalid()

StageResult reusex::pipeline::StageResult::invalid ( std::string message)
static

References message.

◆ success() [1/2]

StageResult reusex::pipeline::StageResult::success ( std::string message,
std::vector< StageArtifact > outputs )
static

References message, and outputs.

◆ success() [2/2]

StageResult reusex::pipeline::StageResult::success ( std::string message = {})
static

References message.

Member Data Documentation

◆ cancelled

bool reusex::pipeline::StageResult::cancelled = false

The stage stopped early on a cancel request.

Definition at line 90 of file stages.hpp.

◆ invalid_input

bool reusex::pipeline::StageResult::invalid_input = false

The request was refused before/without doing the work because an input or a parameter was invalid, as opposed to the stage failing part-way through.

Front ends need the distinction: rux returns INVALID_ARGUMENT rather than a generic error, and an HTTP front end would answer 400, not 500. Always accompanied by ok == false.

Definition at line 96 of file stages.hpp.

Referenced by rux::exit_code_for().

◆ message

std::string reusex::pipeline::StageResult::message

Human-readable summary or failure reason.

Definition at line 97 of file stages.hpp.

Referenced by cancel(), failure(), invalid(), success(), and success().

◆ ok

bool reusex::pipeline::StageResult::ok = false

The stage completed and wrote its outputs.

Definition at line 89 of file stages.hpp.

Referenced by rux::exit_code_for().

◆ outputs

std::vector<StageArtifact> reusex::pipeline::StageResult::outputs

What this run actually wrote.

Only populated on ok == true, and only with artifacts the stage can attest to having written on this run — a name that merely exists in the project afterwards is not reported.

Definition at line 101 of file stages.hpp.

Referenced by success().


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