20 : key_{std::move(
key)}, expected_type_{type}, desc_{
key} {}
22 [[nodiscard]]
const std::string &
key()
const {
27 return expected_type_;
40 std::type_index expected_type_;
51 [[nodiscard]]
virtual std::vector<ArtifactMetadata>
DeclareInputs()
const = 0;
54 [[nodiscard]]
virtual std::vector<ArtifactMetadata>
DeclareOutputs()
const = 0;
56 [[nodiscard]]
virtual std::expected<AnyMap, std::string>
Execute(
const AnyMap &inputs) = 0;
62 [[nodiscard]]
const std::string &
name()
const {
Coordinates the generation and consumption of diagnostic messages.
Operation(const gsl::not_null< DiagEngine * > diag)
virtual std::vector< ArtifactMetadata > DeclareInputs() const =0
Declares the input artifacts required by this operation.
const std::string & name() const
virtual std::vector< ArtifactMetadata > DeclareOutputs() const =0
Declares the artifacts this operation will produce.
void set_name(const std::string &name)
const DiagEngine & diag() const
virtual std::expected< AnyMap, std::string > Execute(const AnyMap &inputs)=0
virtual ~Operation()=default
A smart pointer that represents a non-owning view of a resource.