|
tin
1.5.9
|
#include <actor.h>

Public Types | |
| using | event_type = Event |
| Event type accepted by this port. More... | |
| using | sink_type = Sink |
| Actor or adapter type referenced by this port. More... | |
Public Member Functions | |
| constexpr | input_port (Sink &sink) |
| bool | try_send (Event const &event) const requires actor_sink< Sink |
| bool | try_send (Event &&event) const requires actor_sink< Sink |
| bool | send_event (Event const &event) const requires actor_sink< Sink |
Alias for try_send(event) that satisfies event-sink shaped code. More... | |
| bool | send_event (Event &&event) const requires actor_sink< Sink |
Move-sending alias for try_send(std::move(event)). More... | |
Public Attributes | |
| bool | Event |
Non-owning typed ingress view for an actor sink.
input_port narrows access to one event type. It is useful when wiring actors because a link only needs to send a specific value into a specific sink, not expose the sink's entire API.
| using tsm::runtime::input_port< Event, Sink >::event_type = Event |
Event type accepted by this port.
| using tsm::runtime::input_port< Event, Sink >::sink_type = Sink |
Actor or adapter type referenced by this port.
|
inlineexplicitconstexpr |
Bind the port to an existing sink.
The caller owns sink; the port stores only a pointer and must not outlive the referenced object.
| bool tsm::runtime::input_port< Event, Sink >::send_event | ( | Event && | event | ) | const |
Move-sending alias for try_send(std::move(event)).
| bool tsm::runtime::input_port< Event, Sink >::send_event | ( | Event const & | event | ) | const |
Alias for try_send(event) that satisfies event-sink shaped code.
| bool tsm::runtime::input_port< Event, Sink >::try_send | ( | Event && | event | ) | const |
Try to move an event into the sink.
Returns true when the sink accepts the event and false when the sink rejects it. On rejection the event has been passed to the sink API, so callers should treat moved-from state normally for Event.
| bool tsm::runtime::input_port< Event, Sink >::try_send | ( | Event const & | event | ) | const |
Try to send a const event into the sink.
Returns true when the sink accepts the event and false when the sink rejects it, usually because its bounded storage is full.
| bool tsm::runtime::input_port< Event, Sink >::Event |