OMK::IncomingSynchronisationMessage Class Reference

this is the abstract class for any sent synchronisation message used on a message passing distributed architecture. More...

#include <OMKIncomingSynchronisationMessage.h>

Inheritance diagram for OMK::IncomingSynchronisationMessage:

Inheritance graph
[legend]
Collaboration diagram for OMK::IncomingSynchronisationMessage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~IncomingSynchronisationMessage ()
 a destructor
 IncomingSynchronisationMessage ()
 a default constructor
virtual const DategetMessageDate ()=0
 The timestamp of the incomming message.
template<typename T>
IncomingSynchronisationMessageoperator>> (T &val)
 extraction operator : will work as long as unpack ( T & ) is defined as a member function
IncomingSynchronisationMessageoperator>> (char *val)
 extract a C-Style string
virtual void get (Packable &val)
 get a packable in the message
virtual void get (bool &val)=0
 get a char in the message
virtual void get (char &val)=0
 get a char in the message
virtual void get (long &val)=0
 get a long in the message
virtual void get (unsigned long &val)=0
 get an unsigned long in the message
virtual void get (int &val)=0
 get an int in the message
virtual void get (unsigned int &val)=0
 get an unsigned int in the message
virtual void get (float &val)=0
 get a float in the message
virtual void get (double &val)=0
 get a double in the message
virtual void get (short &val)=0
 get a short in the message
virtual void get (unsigned short &val)=0
 get an unsigned short in the message
virtual void get (char *val)=0
 get a C style string, whithout it's length wich should be unpacked first if the string isn't if constant length
virtual void get (std::string &val)=0
 get an string in the message
virtual void get (char *val, int cnt)=0
 get an array of char in the message
virtual void get (long *val, int cnt)=0
 get an array of long in the message
virtual void get (unsigned long *val, int cnt)=0
 get an array of unsigned long in the message
virtual void get (int *val, int cnt)=0
 get an array of int in the message
virtual void get (unsigned int *val, int cnt)=0
 get an array of unsigned int in the message
virtual void get (float *val, int cnt)=0
 get an array of float in the message
virtual void get (double *val, int cnt)=0
 get an array of double in the message
virtual void get (short *val, int cnt)=0
 get an array of short in the message
virtual void get (unsigned short *val, int cnt)=0
 get an array of unsigned short in the message
std::istringstream & getInputStream ()
 member function enabling the unpacking of any flowable : get the input stream.
virtual void unpackInputStream ()
 member function enabling the unpacking of any flowable : get the message in the input stream.

Protected Attributes

std::istringstream * _myis
 the istrstream used to get data that can only be unpacked in a stream

Detailed Description

this is the abstract class for any sent synchronisation message used on a message passing distributed architecture.

should really inherit from ostream for code reuse reason. the generic incominge message for a message passing archistecture class. This class is an abstraction of the previously defined OMKPvmIncomingMessage

Author:
David Margery
Version:
1.0

Definition at line 20 of file OMKIncomingSynchronisationMessage.h.


Constructor & Destructor Documentation

IncomingSynchronisationMessage::~IncomingSynchronisationMessage (  )  [virtual]

a destructor

Definition at line 16 of file OMKIncomingSynchronisationMessage.cpp.

References _myis.

00017 {
00018    delete _myis ;
00019 }

IncomingSynchronisationMessage::IncomingSynchronisationMessage (  ) 

a default constructor

Definition at line 10 of file OMKIncomingSynchronisationMessage.cpp.

00010                                                                :
00011    _myis ( 0 )
00012 {
00013 }


Member Function Documentation

virtual const Date& OMK::IncomingSynchronisationMessage::getMessageDate (  )  [pure virtual]

The timestamp of the incomming message.

Implemented in OMK::PvmIncomingMessage.

Referenced by OMK::AbstractFifo< T >::unpack().

template<typename T>
IncomingSynchronisationMessage& OMK::IncomingSynchronisationMessage::operator>> ( T &  val  )  [inline]

extraction operator : will work as long as unpack ( T & ) is defined as a member function

Definition at line 34 of file OMKIncomingSynchronisationMessage.h.

00035    {
00036       get ( val ) ; 
00037       return *this ;
00038    }

IncomingSynchronisationMessage & IncomingSynchronisationMessage::operator>> ( char *  val  ) 

extract a C-Style string

Definition at line 40 of file OMKIncomingSynchronisationMessage.cpp.

References get().

00041 {
00042    get ( val ) ; 
00043    return *this ;
00044 }

void IncomingSynchronisationMessage::get ( Packable val  )  [virtual]

get a packable in the message

Definition at line 47 of file OMKIncomingSynchronisationMessage.cpp.

References OMK::Packable::unpack().

Referenced by operator>>(), operator>>(), and unpackInputStream().

00048 {
00049    val.unpack(*this) ;
00050 }

virtual void OMK::IncomingSynchronisationMessage::get ( bool val  )  [pure virtual]

get a char in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( char &  val  )  [pure virtual]

get a char in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( long &  val  )  [pure virtual]

get a long in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned long &  val  )  [pure virtual]

get an unsigned long in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( int val  )  [pure virtual]

get an int in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned int val  )  [pure virtual]

get an unsigned int in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( float &  val  )  [pure virtual]

get a float in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( double &  val  )  [pure virtual]

get a double in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( short &  val  )  [pure virtual]

get a short in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned short &  val  )  [pure virtual]

get an unsigned short in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( char *  val  )  [pure virtual]

get a C style string, whithout it's length wich should be unpacked first if the string isn't if constant length

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( std::string &  val  )  [pure virtual]

get an string in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( char *  val,
int  cnt 
) [pure virtual]

get an array of char in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( long *  val,
int  cnt 
) [pure virtual]

get an array of long in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned long *  val,
int  cnt 
) [pure virtual]

get an array of unsigned long in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( int val,
int  cnt 
) [pure virtual]

get an array of int in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned int val,
int  cnt 
) [pure virtual]

get an array of unsigned int in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( float *  val,
int  cnt 
) [pure virtual]

get an array of float in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( double *  val,
int  cnt 
) [pure virtual]

get an array of double in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( short *  val,
int  cnt 
) [pure virtual]

get an array of short in the message

Implemented in OMK::PvmIncomingMessage.

virtual void OMK::IncomingSynchronisationMessage::get ( unsigned short *  val,
int  cnt 
) [pure virtual]

get an array of unsigned short in the message

Implemented in OMK::PvmIncomingMessage.

istringstream & IncomingSynchronisationMessage::getInputStream (  ) 

member function enabling the unpacking of any flowable : get the input stream.

Definition at line 21 of file OMKIncomingSynchronisationMessage.cpp.

References _myis, and OMASSERT.

Referenced by OMK::Flowable::unpack().

00022 {
00023    OMASSERT( _myis != NULL ) ;
00024    return *_myis ;
00025 }

void IncomingSynchronisationMessage::unpackInputStream (  )  [virtual]

member function enabling the unpacking of any flowable : get the message in the input stream.

get all the data in the active buffer to an input stream

Definition at line 29 of file OMKIncomingSynchronisationMessage.cpp.

References _myis, and get().

Referenced by OMK::Flowable::unpack().

00030 {
00031    delete _myis ;
00032 
00033    string inputStream ;
00034    get ( inputStream ) ;
00035   _myis = new istringstream ( inputStream ) ;
00036 }


Member Data Documentation

std::istringstream* OMK::IncomingSynchronisationMessage::_myis [protected]

the istrstream used to get data that can only be unpacked in a stream

Definition at line 119 of file OMKIncomingSynchronisationMessage.h.

Referenced by getInputStream(), OMK::PvmIncomingMessage::initialise(), unpackInputStream(), and ~IncomingSynchronisationMessage().


logo OpenMask

Documentation generated on Mon Jun 9 11:46:01 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007