Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Grappa::PayloadMessage< T > Class Template Reference

A message with dynamic payload. More...

#include <Message.hpp>

Inheritance diagram for Grappa::PayloadMessage< T >:
Grappa::ExternalCountPayloadMessage< T >

Public Member Functions

 PayloadMessage ()
 Construct a message. More...
 
 PayloadMessage (Core dest, T t, void *payload, size_t payload_size)
 Construct a message. More...
 
 PayloadMessage (const PayloadMessage &m)=delete
 Not allowed. More...
 
PayloadMessageoperator= (const PayloadMessage &m)=delete
 Not allowed. More...
 
PayloadMessageoperator= (PayloadMessage &&m)=delete
 Not allowed. More...
 
 PayloadMessage (PayloadMessage &&m)=default
 
virtual ~PayloadMessage ()
 
void set_payload (void *payload, size_t size)
 
void delete_payload_after_send ()
 
virtual void reset ()
 
virtual const char * typestr ()
 
T & operator* ()
 for Messages with modifiable contents. More...
 
T * operator-> ()
 Access message contents. More...
 
virtual const size_t serialized_size () const
 How much storage do we need to send this message? More...
 
virtual const size_t size () const
 
virtual void deliver_locally ()
 
virtual char * serialize_to (char *p, size_t max_size)
 Copy this message into a buffer. More...
 

Static Public Member Functions

static char * deserialize_and_call (char *t)
 These are used by the aggregator to send and receive messages. More...
 

Detailed Description

template<typename T>
class Grappa::PayloadMessage< T >

A message with dynamic payload.

Storage for message contents is internal, but payload is stored externally. Destructor blocks until message is sent. Best used through message function.

Definition at line 161 of file Message.hpp.

Constructor & Destructor Documentation

template<typename T>
Grappa::PayloadMessage< T >::PayloadMessage ( )
inline

Construct a message.

Definition at line 172 of file Message.hpp.

template<typename T>
Grappa::PayloadMessage< T >::PayloadMessage ( Core  dest,
t,
void *  payload,
size_t  payload_size 
)
inline

Construct a message.

Parameters
destID of destination core.
tContents of message to send.
payloadpointer to payload buffer
payload_sizesize of payload (in bytes)

Definition at line 185 of file Message.hpp.

template<typename T>
Grappa::PayloadMessage< T >::PayloadMessage ( const PayloadMessage< T > &  m)
delete

Not allowed.

template<typename T>
Grappa::PayloadMessage< T >::PayloadMessage ( PayloadMessage< T > &&  m)
default
template<typename T>
virtual Grappa::PayloadMessage< T >::~PayloadMessage ( )
inlinevirtual

Definition at line 201 of file Message.hpp.

Member Function Documentation

template<typename T>
void Grappa::PayloadMessage< T >::delete_payload_after_send ( )
inline

Definition at line 212 of file Message.hpp.

template<typename T>
virtual void Grappa::PayloadMessage< T >::deliver_locally ( )
inlinevirtual

Definition at line 270 of file Message.hpp.

template<typename T>
static char* Grappa::PayloadMessage< T >::deserialize_and_call ( char *  t)
inlinestatic

These are used by the aggregator to send and receive messages.

Deserialize and call one of these messages from a buffer. This is run on the remote machine.

Parameters
taddress of message functor/contents in buffer
Returns
address of byte following message functor/contents in buffer

Definition at line 257 of file Message.hpp.

template<typename T>
T& Grappa::PayloadMessage< T >::operator* ( )
inline

for Messages with modifiable contents.

Don't use with lambdas.Access message contents.

Definition at line 230 of file Message.hpp.

template<typename T>
T* Grappa::PayloadMessage< T >::operator-> ( )
inline

Access message contents.

Definition at line 235 of file Message.hpp.

template<typename T>
PayloadMessage& Grappa::PayloadMessage< T >::operator= ( const PayloadMessage< T > &  m)
delete

Not allowed.

template<typename T>
PayloadMessage& Grappa::PayloadMessage< T >::operator= ( PayloadMessage< T > &&  m)
delete

Not allowed.

template<typename T>
virtual void Grappa::PayloadMessage< T >::reset ( )
inlinevirtual

Definition at line 214 of file Message.hpp.

template<typename T>
virtual char* Grappa::PayloadMessage< T >::serialize_to ( char *  p,
size_t  max_size 
)
inlinevirtual

Copy this message into a buffer.

Definition at line 279 of file Message.hpp.

template<typename T>
virtual const size_t Grappa::PayloadMessage< T >::serialized_size ( ) const
inlinevirtual

How much storage do we need to send this message?

Definition at line 242 of file Message.hpp.

template<typename T>
void Grappa::PayloadMessage< T >::set_payload ( void *  payload,
size_t  size 
)
inline

Definition at line 206 of file Message.hpp.

template<typename T>
virtual const size_t Grappa::PayloadMessage< T >::size ( ) const
inlinevirtual

Definition at line 246 of file Message.hpp.

template<typename T>
virtual const char* Grappa::PayloadMessage< T >::typestr ( )
inlinevirtual

Definition at line 221 of file Message.hpp.


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