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

PLearn::IntStream Class Reference

#include <IntStream.h>

Inheritance diagram for PLearn::IntStream:

Inheritance graph
[legend]
Collaboration diagram for PLearn::IntStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IntStream (int p=0)
virtual void seek (long position)
 move to given position

virtual int next ()
 return currently available int from the stream (at currente position) and THEN increment position to NEXT item

virtual int current ()
 return next available int from the stream

virtual long size ()
 total length of the stream

virtual int position ()
 current position (= size if we are past the last read element)

virtual long remaining ()
 remaining int's (INCLUDING the current one), = 0 if none left to read

virtual void reopen ()
virtual ~IntStream ()

Protected Attributes

long pos

Constructor & Destructor Documentation

PLearn::IntStream::IntStream int  p = 0  )  [inline]
 

Definition at line 64 of file IntStream.h.

References pos.

virtual PLearn::IntStream::~IntStream  )  [inline, virtual]
 

Definition at line 91 of file IntStream.h.


Member Function Documentation

virtual int PLearn::IntStream::current  )  [inline, virtual]
 

return next available int from the stream

Reimplemented in PLearn::FilesIntStream, and PLearn::InMemoryIntStream.

Definition at line 74 of file IntStream.h.

virtual int PLearn::IntStream::next  )  [inline, virtual]
 

return currently available int from the stream (at currente position) and THEN increment position to NEXT item

Reimplemented in PLearn::FilesIntStream, and PLearn::InMemoryIntStream.

Definition at line 71 of file IntStream.h.

Referenced by PLearn::InMemoryIntStream::InMemoryIntStream().

virtual int PLearn::IntStream::position  )  [inline, virtual]
 

current position (= size if we are past the last read element)

Definition at line 80 of file IntStream.h.

References pos.

Referenced by remaining().

virtual long PLearn::IntStream::remaining  )  [inline, virtual]
 

remaining int's (INCLUDING the current one), = 0 if none left to read

Definition at line 83 of file IntStream.h.

References position(), and size().

virtual void PLearn::IntStream::reopen  )  [inline, virtual]
 

Re-open all the file pointers and seek(position()). This is useful when a forked child process wants access to the same stream without interfering with parent

Reimplemented in PLearn::FilesIntStream.

Definition at line 89 of file IntStream.h.

virtual void PLearn::IntStream::seek long  position  )  [inline, virtual]
 

move to given position

Reimplemented in PLearn::FilesIntStream, and PLearn::InMemoryIntStream.

Definition at line 67 of file IntStream.h.

References PLERROR, and seek().

Referenced by seek().

virtual long PLearn::IntStream::size  )  [inline, virtual]
 

total length of the stream

Reimplemented in PLearn::FilesIntStream, and PLearn::InMemoryIntStream.

Definition at line 77 of file IntStream.h.

Referenced by PLearn::InMemoryIntStream::InMemoryIntStream(), and remaining().


Member Data Documentation

long PLearn::IntStream::pos [protected]
 

Definition at line 61 of file IntStream.h.

Referenced by IntStream(), and position().


The documentation for this class was generated from the following file:
Generated on Tue Aug 17 16:23:09 2004 for PLearn by doxygen 1.3.7