Skip to main content

Contract Class

A single validation rule applied to an ordered node list. More...

Declaration

class simaai::neat::Contract { ... }

Included Headers

#include <Contract.h>

Public Destructor Index

~Contract ()=default

Virtual destructor — required for the abstract base. More...

Public Member Functions Index

std::stringid () const =0

Stable identifier (used for filtering, report grouping). More...

std::stringdescription () const

Human-readable description (optional). More...

voidvalidate (std::span< const std::shared_ptr< Node > > nodes, const ValidationContext &ctx, ValidationReport &report) const =0

Validate the node list and append issues to report. More...

Description

A single validation rule applied to an ordered node list.

Contracts must:

  • never include or call GStreamer APIs
  • only use Node/Graph/policy and STL
  • report issues via ValidationReport (do not throw for normal violations)

Concrete contracts implement id(), optionally description(), and the core validate() method that inspects the node list and appends issues to the report.

See Also

ContractRegistry

See Also

ValidationReport

See Also

Validators (built-in implementations)

Definition at line 83 of file Contract.h.

Public Destructor

~Contract()

virtual simaai::neat::Contract::~Contract ()
virtual default

Virtual destructor — required for the abstract base.

Definition at line 86 of file Contract.h.

Public Member Functions

description()

virtual std::string simaai::neat::Contract::description ()
inline virtual

Human-readable description (optional).

Definition at line 92 of file Contract.h.

92 virtual std::string description() const {
93 return "";
94 }

id()

virtual std::string simaai::neat::Contract::id ()

Stable identifier (used for filtering, report grouping).

Definition at line 89 of file Contract.h.

validate()

virtual void simaai::neat::Contract::validate (std::span< const std::shared_ptr< Node > > nodes, const ValidationContext & ctx, ValidationReport & report)

Validate the node list and append issues to report.

Parameters
nodes

The ordered node list being validated.

ctx

Validation context (mode, policy, strictness).

report

Output report; the contract appends issues to it.

Definition at line 103 of file Contract.h.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.