Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Ports::CallbackContractInPort< Payload, ReturnType, Contract > Class Template Reference

#include <Port.h>

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

Public Member Functions

 CallbackContractInPort (CallbackInPort< Payload, ReturnType >::Callback callback)
bool connect (Port *other) override
Public Member Functions inherited from Simo::Ports::CallbackInPort< Payload, ReturnType >
 CallbackInPort (Callback callback)
bool connect (Port *other) override
void callback (Callback callback)
bool has_callback () const
Public Member Functions inherited from Simo::Port
template<typename Self>
TypeId get_type_id (this Self &)
 Utility to the get type of class. Need the type at compile time.
std::string_view name () const
void name (const std::string_view name)
Public Member Functions inherited from Simo::Ports::ContractInterface< Contract >
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 ()

Additional Inherited Members

Public Types inherited from Simo::Ports::CallbackInPort< Payload, ReturnType >
using Callback = std::function<ReturnType(Payload)>
Public Types inherited from Simo::Port
using TypeId = boost::typeindex::type_index
Protected Member Functions inherited from Simo::Ports::CallbackInPort< Payload, ReturnType >
void receive (Payload payload)
std::optional< ReturnType > receive (Payload payload)
Protected Attributes inherited from Simo::Ports::CallbackInPort< Payload, ReturnType >
Callback callback_
Protected Attributes inherited from Simo::Port
std::string name_
Protected Attributes inherited from Simo::Ports::ContractInterface< Contract >
std::optional< Contract > contract_
ContractInterfaceconnected_port_ = nullptr
std::function< bool(Contract)> connected_port_contract_predicate_ {}

Detailed Description

template<typename Payload, typename ReturnType, typename Contract>
class Simo::Ports::CallbackContractInPort< Payload, ReturnType, Contract >

Callback out port with contract logic.

See CallbackInPort and ContractInterface classes

Member Function Documentation

◆ connect()

template<typename Payload, typename ReturnType, typename Contract>
bool Simo::Ports::CallbackContractInPort< Payload, ReturnType, Contract >::connect ( Port * other)
nodiscardoverridevirtual

Implements Simo::Port.


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