Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
Message Class Reference#include <Message.h>
List of all members.
Detailed Description
Messages are objects that can be sent between Channels. They are provided to allow data of arbitrary length and type, e.g. structs, to be sent between processes running on similar machine architectures. WARNING Sending Messages between machines with different architectures can result in erroniuos data being received. Each Message object keeps a pointer to the data it represents and an integer outlining the data size. There is no copy of the data kept by the Message. \
{\bf Constructors} \ Constructors \ {Message();} \ {Message(double *, int num);}\ {Message(int *, int num);}\ {Message(char *, int num);} \ \ Destructor \ {virtual~
Message();}\ \ Public Member Functions \ {virtual int putData(char *theData, int startLoc, int endLoc);}; \ {virtual const char *getData(void);}\ {virtual int getSize(void);} \
{\bf Constructors} \ {Message();} \ To construct an empty message. \
{Message(double *data, int num);}\ To construct a message for sending/receiving an array containing {num} doubles. \
{Message(int *data, int num);}\ To construct a message for sending/receiving an array containing {num} ints. \
{Message(char *data, int num);} \ To construct a message for sending/receiving a string of {num} characters or a struct. \
{\bf Destructor} \ {virtual~
Message();}\ Does nothing. \
{\bf Public Methods } \ {virtual int putData(char *theData, int startLoc, int endLoc);}; \ A method which will put the data given by the character pointer {theData} of size {endLoc -startLoc} into the data array pointed to by the Message starting at location
in this array. Returns
if successful; an error message is printed and a
is returned if not. The routine {bcopy()} is used to copy the data. \
{virtual const char *getData(void);}\ A method which returns a const char * pointer to the messages data. \
{virtual int getSize(void);} \ A method to get the size of the array. The unit of size is that of a character.
Definition at line 99 of file Message.h.
Constructor & Destructor Documentation
Message::Message (
|
double * data,
|
|
int num )
|
|
Message::Message (
|
int * data,
|
|
int num )
|
|
Message::Message (
|
char * data,
|
|
int num )
|
|
Message::~Message (
|
) [virtual]
|
|
Member Function Documentation
const char * Message::getData (
|
void ) [virtual]
|
|
int Message::getSize (
|
void ) [virtual]
|
|
int Message::putData (
|
char * theData,
|
|
int startLoc,
|
|
int endLoc ) [virtual]
|
|
The documentation for this class was generated from the following files:
|