|
Simo 0.0.1
|
#include <Port.h>
Public Types | |
| using | Callback = std::function<ReturnType(Payload)> |
| Public Types inherited from Simo::Port | |
| using | TypeId = boost::typeindex::type_index |
Public Member Functions | |
| 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) |
Protected Member Functions | |
| void | receive (Payload payload) |
| std::optional< ReturnType > | receive (Payload payload) |
Protected Attributes | |
| Callback | callback_ |
| Protected Attributes inherited from Simo::Port | |
| std::string | name_ |
Friends | |
| class | CallbackOutPort< Payload, ReturnType > |
Templated output port that receives payloads from a CallbackInPort of the same type and invokes a callback for each payload.
|
nodiscardoverridevirtual |
Implements Simo::Port.