< OLStreamable > Protocol Reference
[Streams]

A protocol for writing to streams. More...

#import <ObjectiveLib/Streamable.h>

Inheritance diagram for < OLStreamable >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(id) - initWithObjectInStream:
 Initialize the object.
(void) - writeSelfToStream:
 Write the object to a stream.

Detailed Description

A protocol for writing to streams.

For an object to be written to or read from a stream it must implement either the OLStreamable protocol or the NSCoding protocol. When an object is read from a stream the message initWithObjectInStream: (OLStreamable-p) is sent, which reads each of the object's instance variables and initializes the object. For writing, the message writeSelfToStream: (OLStreamable-p) is sent, which writes the instance variables.


Member Function Documentation

- (id) initWithObjectInStream: (OLObjectInStream *)  stream  

Initialize the object.

Each instance variable is read from stream and all other initialization is performed.

Parameters:
stream the stream from which to read
Returns:
a reference to this object

Reimplemented in OLBitSet, OLDeque, OLStreamableFunctor, OLBinaryNegate, OLBinder1st, OLBinder2nd, OLBoolBinder1st, OLBoolBinder2nd, OLMemFun, OLMemFun1, OLUnaryNegate, OLHashMap, OLHashSet, OLList, OLMap, OLPair, OLQueue, OLPriorityQueue, OLSet, OLStack, OLText, OLVector, and OLBoolVector.

- (void) writeSelfToStream: (OLObjectOutStream *)  stream  

Write the object to a stream.

All instance variables are written to stream.

Parameters:
stream the stream to which to write.

Reimplemented in OLBitSet, OLDeque, OLStreamableFunctor, OLBinaryNegate, OLBinder1st, OLBinder2nd, OLBoolBinder1st, OLBoolBinder2nd, OLMemFun, OLMemFun1, OLUnaryNegate, OLHashMap, OLHashSet, OLList, OLMap, OLPair, OLQueue, OLPriorityQueue, OLSet, OLStack, OLText, OLVector, and OLBoolVector.


The documentation for this protocol was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:19:06 2007, © 2004-2007 Will Mason
SourceForge.net Logo