Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Ports::ContractInterface< Contract > Class Template Reference

#include <Port.h>

Inheritance diagram for Simo::Ports::ContractInterface< Contract >:
Simo::Ports::CallbackContractInPort< Payload, ReturnType, Contract > Simo::Ports::CallbackContractOutPort< Payload, ReturnType, Contract >

Public Member Functions

std::optional< Contract > contract ()
void contract (Contract contract)
void connected_port (ContractInterface *port)
void connected_port_contract_predicate (std::function< bool(Contract)> predicate)
std::expected< bool, VERIFY_CONTRACT_ERROR > verify_connected_port_contract ()

Protected Attributes

std::optional< Contract > contract_
ContractInterfaceconnected_port_ = nullptr
std::function< bool(Contract)> connected_port_contract_predicate_ {}

Detailed Description

template<typename Contract>
class Simo::Ports::ContractInterface< Contract >

Class to implement the contract logic.

A contract is just a structure that a connecting port can probe And validate using a predicate


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