Skip to content

Class ILLIXR::switchboard::writer

template <typename Specific_event>

ClassList > ILLIXR > switchboard > writer

A handle which can publish events to a topic.

  • #include <switchboard.hpp>

Inherited by the following classes: ILLIXR::switchboard::network_writer, ILLIXR::switchboard::network_writer, ILLIXR::switchboard::network_writer

Public Functions

Type Name
ptr< Specific_event > allocate (Args &&... args)
Like new /malloc but more efficient for this specific case.
virtual void put (ptr< Specific_event > && this_specific_event)
Publish ev to this topic.
writer (topic & topic)

Protected Attributes

Type Name
topic & topic_

Public Functions Documentation

function allocate

Like new /malloc but more efficient for this specific case.

template<class... Args>
inline ptr < Specific_event > ILLIXR::switchboard::writer::allocate (
    Args &&... args
) 

There is an optimization available which has not yet been implemented: switchboard can reuse memory from old events, like a slab allocator. Suppose module A publishes data for module B. B's deallocation through the destructor, and A's allocation through this method completes the cycle in a double-buffer (AKA swap-chain).


function put

Publish ev to this topic.

inline virtual void ILLIXR::switchboard::writer::put (
    ptr < Specific_event > && this_specific_event
) 


function writer

inline explicit ILLIXR::switchboard::writer::writer (
    topic & topic
) 

Protected Attributes Documentation

variable topic_

topic& ILLIXR::switchboard::writer< Specific_event >::topic_;


The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR/include/illixr/switchboard.hpp