ObjectiveLib  1.0.0
Public Member Functions
<OLStreamable> Protocol Reference

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

Initialize the object.

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

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

Reimplemented in OLBoolVector, OLPriorityQueue, OLText, OLDeque, OLHashMap, OLHashSet, OLMap, OLList, OLVector, OLSet, OLBitSet, OLQueue, OLStack, and OLPair.

- (void) writeSelfToStream: (OLObjectOutStream *)  stream

Write the object to a stream.

All instance variables are written to stream.

Parameters:
streamthe stream to which to write.

Reimplemented in OLBoolVector, OLList, OLText, OLMap, OLDeque, OLHashMap, OLVector, OLPriorityQueue, OLSet, OLHashSet, OLBitSet, OLQueue, OLStack, and OLPair.


The documentation for this protocol was generated from the following file:

ObjectiveLibGenerated Sat Feb 15 2014 07:45:35, © 2004-2007 Will Mason