Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Ports::InPort< Payload > Class Template Reference

#include <Port.h>

Inheritance diagram for Simo::Ports::InPort< Payload >:
Simo::Port

Public Member Functions

bool connect (Port *other) override
Payload && receive ()
Payload * peek ()
void clear ()
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 Attributes

OutPort< Payload > * connecting_port = nullptr
Protected Attributes inherited from Simo::Port
std::string name_

Friends

class OutPort< Payload >

Additional Inherited Members

Public Types inherited from Simo::Port
using TypeId = boost::typeindex::type_index

Detailed Description

template<typename Payload>
class Simo::Ports::InPort< Payload >

Templated port that can received payloads from an OutPort of the same type

A payload can be extracted with the receive method. The peek method allows to look at the payload without extracting it.

Member Function Documentation

◆ connect()

template<typename Payload>
bool Simo::Ports::InPort< Payload >::connect ( Port * other)
nodiscardoverridevirtual

Implements Simo::Port.


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