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

Commun Class Reference

Communication. More...

#include <commun.h>

Inheritance diagram for Commun::

CommunShMem CommunSocket List of all members.

Public Methods

virtual ~Commun ()
 Destructor.

virtual int initialize ()
 Initialization of communication. More...

virtual Commun & operator>> (Buffer &b)
 Read data. More...

virtual Commun & operator<< (const Buffer &b)
 Write data. More...

int hasFailed ()
 Failure indication. More...

virtual int isReady ()
 Communication channel ready for reading. More...


Protected Methods

 Commun ()
 Default _PROTECTED_ constructor.


Protected Attributes

int _failed
 failure indicator.


Detailed Description

Communication.

This abstract class offers standard interface for all inherited communication classes. Whole communication is done thru an instance of this class or its descendant. On different systems the implementation of communication object can be different but the interface stays and the rest of program is not changed.

See also:
CommunSocket, CommunShMem
Author:
Marek Przeczek

Definition at line 53 of file commun.h.


Member Function Documentation

int Commun::hasFailed   [inline]
 

Failure indication.

Use this method if you want to know the last operation was successful or not.

Returns:
0 (last operation was successful); 1 (last operation failed)

Definition at line 110 of file commun.h.

Referenced by IProf::run().

virtual int Commun::initialize   [inline, virtual]
 

Initialization of communication.

This method should initialize the communication, it means to make a connection with opposite side.

Returns:
0 (failed); 1 (ok, initialized)

Reimplemented in CommunSocket, and CommunShMem.

Definition at line 80 of file commun.h.

Referenced by IProf::run().

virtual int Commun::isReady   [inline, virtual]
 

Communication channel ready for reading.

This method returns TRUE, if there are data in communication channel and should be read from it.

Returns:
0 (nothing); 1 (data in channel)

Reimplemented in CommunSocket, and CommunShMem.

Definition at line 119 of file commun.h.

Referenced by IProf::run().

virtual Commun& Commun::operator<< const Buffer   b [inline, virtual]
 

Write data.

This operator is used to write data from buffer to communication channel (socket, shmem etc.).

Parameters:
b  reference to Buffer object
Returns:
reference to this Commun object
See also:
operator>>()

Reimplemented in CommunSocket, and CommunShMem.

Definition at line 102 of file commun.h.

virtual Commun& Commun::operator>> Buffer   b [inline, virtual]
 

Read data.

This operator is used to read data from communication channel (socket, shmem etc.) to buffer.

Parameters:
b  reference to Buffer object
Returns:
reference to this Commun object
See also:
operator<<()

Reimplemented in CommunSocket, and CommunShMem.

Definition at line 91 of file commun.h.


The documentation for this class was generated from the following file:
Generated on Mon Jan 28 14:53:28 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001