FileStream Class Reference

#include <Stream.h>

Inherits BaseStream.


Public Member Functions

 FileStream (FILE *fA, Guint startA, GBool limitedA, Guint lengthA, Object *dictA)
virtual ~FileStream ()
virtual StreammakeSubStream (Guint startA, GBool limitedA, Guint lengthA, Object *dictA)
virtual StreamKind getKind ()
virtual void reset ()
virtual void close ()
virtual int getChar ()
virtual int lookChar ()
virtual int getPos ()
virtual void setPos (Guint pos, int dir=0)
virtual void ignoreLength ()
virtual Guint getStart ()
virtual void moveStart (int delta)

Private Member Functions

GBool fillBuf ()

Private Attributes

FILE * f
Guint start
GBool limited
Guint length
char buf [fileStreamBufSize]
char * bufPtr
char * bufEnd
Guint bufPos
int savePos
GBool saved


Detailed Description

Definition at line 264 of file Stream.h.


Constructor & Destructor Documentation

FileStream::FileStream ( FILE *  fA,
Guint  startA,
GBool  limitedA,
Guint  lengthA,
Object dictA 
)

virtual FileStream::~FileStream (  )  [virtual]


Member Function Documentation

virtual Stream* FileStream::makeSubStream ( Guint  startA,
GBool  limitedA,
Guint  lengthA,
Object dictA 
) [virtual]

Implements BaseStream.

virtual StreamKind FileStream::getKind (  )  [inline, virtual]

Implements Stream.

Definition at line 272 of file Stream.h.

References strFile.

00272 { return strFile; }

virtual void FileStream::reset (  )  [virtual]

Implements Stream.

virtual void FileStream::close (  )  [virtual]

Reimplemented from Stream.

virtual int FileStream::getChar (  )  [inline, virtual]

Implements Stream.

Definition at line 275 of file Stream.h.

References bufEnd, bufPtr, and fillBuf().

00276     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }

virtual int FileStream::lookChar (  )  [inline, virtual]

Implements Stream.

Definition at line 277 of file Stream.h.

References bufEnd, bufPtr, and fillBuf().

00278     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }

virtual int FileStream::getPos (  )  [inline, virtual]

Implements Stream.

Definition at line 279 of file Stream.h.

References buf, bufPos, and bufPtr.

00279 { return bufPos + (bufPtr - buf); }

virtual void FileStream::setPos ( Guint  pos,
int  dir = 0 
) [virtual]

Implements BaseStream.

virtual void FileStream::ignoreLength (  )  [inline, virtual]

Reimplemented from Stream.

Definition at line 281 of file Stream.h.

References gFalse, and limited.

00281 { limited = gFalse; }

virtual Guint FileStream::getStart (  )  [inline, virtual]

Implements BaseStream.

Definition at line 282 of file Stream.h.

References start.

00282 { return start; }

virtual void FileStream::moveStart ( int  delta  )  [virtual]

Implements BaseStream.

GBool FileStream::fillBuf (  )  [private]

Referenced by getChar(), and lookChar().


Field Documentation

FILE* FileStream::f [private]

Definition at line 289 of file Stream.h.

Guint FileStream::start [private]

Definition at line 290 of file Stream.h.

Referenced by getStart().

GBool FileStream::limited [private]

Definition at line 291 of file Stream.h.

Referenced by ignoreLength().

Guint FileStream::length [private]

Definition at line 292 of file Stream.h.

char FileStream::buf[fileStreamBufSize] [private]

Definition at line 293 of file Stream.h.

Referenced by getPos().

char* FileStream::bufPtr [private]

Definition at line 294 of file Stream.h.

Referenced by getChar(), getPos(), and lookChar().

char* FileStream::bufEnd [private]

Definition at line 295 of file Stream.h.

Referenced by getChar(), and lookChar().

Guint FileStream::bufPos [private]

Definition at line 296 of file Stream.h.

Referenced by getPos().

int FileStream::savePos [private]

Definition at line 297 of file Stream.h.

GBool FileStream::saved [private]

Definition at line 298 of file Stream.h.


The documentation for this class was generated from the following file:
Generated on Sat Oct 11 07:45:56 2008 for libextractor by  doxygen 1.5.1