|
qb
2.0.0.0
C++17 Actor Framework
|
Represents a communication channel between actors. More...
#include <Pipe.h>
Public Member Functions | |
| Pipe (Pipe const &)=default | |
| Pipe & | operator= (Pipe const &)=default |
| template<typename _Event, typename... _Args> | |
| _Event & | push (_Args &&...args) const noexcept |
| Push an event to the pipe. | |
| template<typename _Event, typename... _Args> | |
| _Event & | allocated_push (std::size_t size, _Args &&...args) const noexcept |
| Push an event with pre-allocated size to the pipe. | |
| ActorId | getDestination () const noexcept |
| Get the destination actor ID. | |
| ActorId | getSource () const noexcept |
| Get the source actor ID. | |
Represents a communication channel between actors.
A Pipe object is returned by Actor::getPipe() and provides a way to send events between actors. It maintains references to both the source and destination actors and the underlying virtual pipe for communication.
|
noexcept |
Push an event to the pipe.
| _Event | Type of event to push |
| _Args | Argument types for event construction |
| args | Arguments for event construction |
This function creates a new event of type _Event and sends it through the pipe. The event will be delivered to the destination actor.
|
nodiscardnoexcept |
Push an event with pre-allocated size to the pipe.
| _Event | Type of event to push |
| _Args | Argument types for event construction |
| size | Pre-allocated size for the event |
| args | Arguments for event construction |
This function creates a new event of type _Event with a pre-allocated size and sends it through the pipe. The event will be delivered to the destination actor.
|
inlinenodiscardnoexcept |
Get the destination actor ID.