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

A standard message. More...

#include <Message.hpp>

Inheritance diagram for Grappa::Message< T >:
Grappa::ReuseMessage< T >

Public Member Functions

 Message ()
 Construct a message. More...
 
 Message (Core dest, T t)
 Construct a message. More...
 
 Message (const Message &m)=delete
 Not allowed. More...
 
Messageoperator= (const Message &m)=delete
 Not allowed. More...
 
Messageoperator= (Message &&m)=delete
 
 Message (Message &&m)=default
 
virtual ~Message ()
 
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::Message< T >

A standard message.

Storage is internal. Destructor blocks until message is sent. Best used through message function.

Definition at line 40 of file Message.hpp.

Constructor & Destructor Documentation

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

Construct a message.

Definition at line 46 of file Message.hpp.

template<typename T>
Grappa::Message< T >::Message ( Core  dest,
t 
)
inline

Construct a message.

Parameters
destID of destination core.
tContents of message to send.

Definition at line 54 of file Message.hpp.

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

Not allowed.

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

Definition at line 65 of file Message.hpp.

Member Function Documentation

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

Definition at line 110 of file Message.hpp.

template<typename T>
static char* Grappa::Message< 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 103 of file Message.hpp.

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

for Messages with modifiable contents.

Don't use with lambdas.Access message contents.

Definition at line 78 of file Message.hpp.

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

Access message contents.

Definition at line 83 of file Message.hpp.

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

Not allowed.

template<typename T>
Message& Grappa::Message< T >::operator= ( Message< T > &&  m)
delete
template<typename T>
virtual char* Grappa::Message< T >::serialize_to ( char *  p,
size_t  max_size 
)
inlinevirtual

Copy this message into a buffer.

Definition at line 122 of file Message.hpp.

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

How much storage do we need to send this message?

Definition at line 88 of file Message.hpp.

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

Definition at line 92 of file Message.hpp.

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

Definition at line 69 of file Message.hpp.


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