Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsIncomingSynchronisationMessage Class Reference

the generic incominge message for a message passing archistecture class. More...

#include <PsIncomingSynchronisationMessage.h>

Inheritance diagram for PsIncomingSynchronisationMessage:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~PsIncomingSynchronisationMessage ()
 a destructor

 PsIncomingSynchronisationMessage ()
 a default constructor

virtual const PsDategetMessageDate ()=0
 The timestamp of the incomming message.

template<typename T> PsIncomingSynchronisationMessage & operator>> (T &val)
 extraction operator : will work as long as unpack ( T & ) is defined as a member function

PsIncomingSynchronisationMessage & operator>> (char *val)
 extract a C-Style string

virtual void get (PsPackable &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 (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

istrstream & 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

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


Detailed Description

the generic incominge message for a message passing archistecture class.

This class is an abstraction of the previously defined PsnPvmIncomingMessage

Author:
D. Margery
Version:
1.0

Definition at line 28 of file PsIncomingSynchronisationMessage.h.


Constructor & Destructor Documentation

PsIncomingSynchronisationMessage::~PsIncomingSynchronisationMessage   [virtual]
 

a destructor

Definition at line 13 of file PsIncomingSynchronisationMessage.cxx.

References _myis.

00014 {
00015    if ( _myis != NULL ) delete _myis ;
00016 }

PsIncomingSynchronisationMessage::PsIncomingSynchronisationMessage  
 

a default constructor

Definition at line 7 of file PsIncomingSynchronisationMessage.cxx.

00007                                                                    :
00008    _myis ( 0 )
00009 {
00010 }


Member Function Documentation

virtual void PsIncomingSynchronisationMessage::get unsigned short *    val,
int    cnt
[pure virtual]
 

get an array of unsigned short in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get short *    val,
int    cnt
[pure virtual]
 

get an array of short in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get double *    val,
int    cnt
[pure virtual]
 

get an array of double in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get float *    val,
int    cnt
[pure virtual]
 

get an array of float in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get unsigned int *    val,
int    cnt
[pure virtual]
 

get an array of unsigned int in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get int *    val,
int    cnt
[pure virtual]
 

get an array of int in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get unsigned long *    val,
int    cnt
[pure virtual]
 

get an array of unsigned long in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get long *    val,
int    cnt
[pure virtual]
 

get an array of long in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get char *    val,
int    cnt
[pure virtual]
 

get an array of char in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get string &    val [pure virtual]
 

get an string in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::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 PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get unsigned short &    val [pure virtual]
 

get an unsigned short in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get short &    val [pure virtual]
 

get a short in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get double &    val [pure virtual]
 

get a double in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get float &    val [pure virtual]
 

get a float in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get unsigned int &    val [pure virtual]
 

get an unsigned int in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get int &    val [pure virtual]
 

get an int in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get unsigned long &    val [pure virtual]
 

get an unsigned long in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get long &    val [pure virtual]
 

get a long in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get char &    val [pure virtual]
 

get a char in the message

Implemented in PsnPvmIncomingMessage.

virtual void PsIncomingSynchronisationMessage::get bool &    val [pure virtual]
 

get a char in the message

Implemented in PsnPvmIncomingMessage.

void PsIncomingSynchronisationMessage::get PsPackable   val [virtual]
 

get a packable in the message

Definition at line 65 of file PsIncomingSynchronisationMessage.cxx.

References PsPackable::unpack().

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

00066 {
00067    val.unpack(*this) ;
00068 }

istrstream & PsIncomingSynchronisationMessage::getInputStream  
 

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

Definition at line 23 of file PsIncomingSynchronisationMessage.cxx.

Referenced by PsFlowable::unpack().

00025 {
00026    assert ( _myis != NULL ) ;
00027    return *_myis ;
00028 }

virtual const PsDate& PsIncomingSynchronisationMessage::getMessageDate   [pure virtual]
 

The timestamp of the incomming message.

Implemented in PsnPvmIncomingMessage.

Referenced by PsnAbstractFifo< Type >::unpack().

PsIncomingSynchronisationMessage & PsIncomingSynchronisationMessage::operator>> char *    val
 

extract a C-Style string

Definition at line 58 of file PsIncomingSynchronisationMessage.cxx.

References get().

00059 {
00060    get ( val ) ; 
00061    return *this ;
00062 }

template<typename T>
PsIncomingSynchronisationMessage& PsIncomingSynchronisationMessage::operator>> T &    val [inline]
 

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

Definition at line 42 of file PsIncomingSynchronisationMessage.h.

References get().

00044    {
00045       get ( val ) ; 
00046       return *this ;

void PsIncomingSynchronisationMessage::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 32 of file PsIncomingSynchronisationMessage.cxx.

References _myis, and get().

Referenced by PsFlowable::unpack().

00033 {
00034    if ( _myis != NULL ) delete _myis ;
00035 
00036 #ifdef _USESSTREAM
00037    string inputStream ;
00038    get ( inputStream ) ;
00039   _myis = new istringstream ( inputStream ) ;
00040 #else
00041 
00042   int messageLength ;
00043 
00044   get ( messageLength ) ;
00045 
00046   char * message = new char [messageLength] ;
00047 
00048   get ( message ) ;
00049 
00050   assert (message [messageLength -1] == 0 ) ;
00051   
00052   _myis = new istrstream (message, messageLength) ;
00053 #endif
00054 }


Member Data Documentation

istrstream* PsIncomingSynchronisationMessage::_myis [protected]
 

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

Definition at line 134 of file PsIncomingSynchronisationMessage.h.

Referenced by PsnPvmIncomingMessage::initialise(), unpackInputStream(), and ~PsIncomingSynchronisationMessage().


The documentation for this class was generated from the following files:
logo OpenMask

Documentation generated on Mon Nov 25 15:26:02 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001