aether::message::writer< OctreeTraits, W > Class Template Reference

A sink for messages to be sent by the process. More...

#include <message.hh>

Public Types

using octree_traits = OctreeTraits
 
using morton_type = typename octree_traits::morton_type
 
using source_type = std::variant< global_state, worker_id >
 
using destination_type = std::variant< global_state, worker_id, all_workers, topic_list, closest_worker< morton_type > >
 

Public Member Functions

 writer (const writer &)=delete
 
 writer (writer_type &_writer, const source_type &_default_source)
 
void set_source (const source_type &source)
 Called internally by Aether. More...
 
void set_destination (const destination_type dest)
 Set the destination of the message. More...
 
void push_bytes (const void *data, size_t len)
 Sets the binary payload to be sent. More...
 
int send ()
 Sends the binary payload. More...
 
writer_type & get_internal_writer ()
 

Detailed Description

template<typename OctreeTraits, typename W>
class aether::message::writer< OctreeTraits, W >

A sink for messages to be sent by the process.

Template Parameters
OctreeTraits
W- a binary writer implementation

Member Typedef Documentation

template<typename OctreeTraits , typename W >
using aether::message::writer< OctreeTraits, W >::destination_type = std::variant< global_state, worker_id, all_workers, topic_list, closest_worker<morton_type> >
template<typename OctreeTraits , typename W >
using aether::message::writer< OctreeTraits, W >::morton_type = typename octree_traits::morton_type
template<typename OctreeTraits , typename W >
using aether::message::writer< OctreeTraits, W >::octree_traits = OctreeTraits
template<typename OctreeTraits , typename W >
using aether::message::writer< OctreeTraits, W >::source_type = std::variant<global_state, worker_id>

Constructor & Destructor Documentation

template<typename OctreeTraits , typename W >
aether::message::writer< OctreeTraits, W >::writer ( const writer< OctreeTraits, W > &  )
delete
template<typename OctreeTraits , typename W >
aether::message::writer< OctreeTraits, W >::writer ( writer_type &  _writer,
const source_type _default_source 
)

Member Function Documentation

template<typename OctreeTraits , typename W >
writer_type& aether::message::writer< OctreeTraits, W >::get_internal_writer ( )
Returns
Get the internal writer object. Used intenally.
template<typename OctreeTraits , typename W >
void aether::message::writer< OctreeTraits, W >::push_bytes ( const void *  data,
size_t  len 
)

Sets the binary payload to be sent.

template<typename OctreeTraits , typename W >
int aether::message::writer< OctreeTraits, W >::send ( )

Sends the binary payload.

Returns
number of bytes sent.
template<typename OctreeTraits , typename W >
void aether::message::writer< OctreeTraits, W >::set_destination ( const destination_type  dest)

Set the destination of the message.

template<typename OctreeTraits , typename W >
void aether::message::writer< OctreeTraits, W >::set_source ( const source_type source)

Called internally by Aether.

Set the source of the message.