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

MPS::SimplTransport::SimplIOStream Class Reference

Inheritance diagram for MPS::SimplTransport::SimplIOStream:

Inheritance graph
[legend]
Collaboration diagram for MPS::SimplTransport::SimplIOStream:

Collaboration graph
[legend]
List of all members.

Public Methods

 SimplIOStream (FCID const &target, bool _u)
 SimplIOStream ()
FCID getOther () const
virtual int read ()
virtual void flush ()

Protected Methods

virtual string referenceTransport () const

Private Attributes

bool useReply
FCID other
char msg [MPS_MESSAGE_MAXLEN]
int pos
int msglen

Constructor & Destructor Documentation

MPS::SimplTransport::SimplIOStream::SimplIOStream ( FCID const & target,
bool _u ) [inline]
 

Construct a SimplIOStream which will communicate with the nominated target, using Reply() or Send() as per the passed-in boolean.

Parameters:
target   the SIMPL process we are to communicate with
_u   initial setting of useReply

Definition at line 84 of file SimplTransport.cc.

MPS::SimplTransport::SimplIOStream::SimplIOStream ( ) [inline]
 

Wait for a message to arrive from some other SIMPL process, and when it does, construct a SimplIOStream around it.

Automatically sets useReply to true, given the nature of the task.

Definition at line 95 of file SimplTransport.cc.


Member Function Documentation

void MPS::SimplTransport::SimplIOStream::flush ( ) [inline, virtual]
 

Sends our outbound message to our interlocutor.

Reimplemented from MPS::OutputStream.

Definition at line 118 of file SimplTransport.cc.

FCID MPS::SimplTransport::SimplIOStream::getOther ( ) const [inline]
 

Returns the handle on the SIMPL process at the other end of this link.

Definition at line 106 of file SimplTransport.cc.

int MPS::SimplTransport::SimplIOStream::read ( ) [inline, virtual]
 

Reads a byte from the message this SimplIOStream has read from our interlocutor.

Reimplemented from MPS::InputStream.

Definition at line 109 of file SimplTransport.cc.

string MPS::SimplTransport::SimplIOStream::referenceTransport ( ) const [inline, protected, virtual]
 

Returns the name of the transport we should look for addresses within when writing out Interface references in writeReference.

Override this in subclasses to set the preferred transport-address-type for references we pickle for transmission.

Returns:
the name of a transport for use in writeReference()
See also:
writeReference()

Reimplemented from MPS::OutputStream.

Definition at line 74 of file SimplTransport.cc.


Member Data Documentation

char MPS::SimplTransport::SimplIOStream::msg [private]
 

Message buffer space. Note yucky fixed size!

Definition at line 69 of file SimplTransport.cc.

int MPS::SimplTransport::SimplIOStream::msglen [private]
 

Number of valid bytes in msg.

Definition at line 71 of file SimplTransport.cc.

FCID MPS::SimplTransport::SimplIOStream::other [private]
 

Handle on our SIMPL interlocutor.

Definition at line 68 of file SimplTransport.cc.

int MPS::SimplTransport::SimplIOStream::pos [private]
 

Current read-position.

Definition at line 70 of file SimplTransport.cc.

bool MPS::SimplTransport::SimplIOStream::useReply [private]
 

Determines if Reply() or Send() will be used to send.

Definition at line 67 of file SimplTransport.cc.


The documentation for this class was generated from the following file:
Generated at Wed Aug 15 01:05:32 2001 for mps-cpp by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001