FX::FXFileStream Class Reference

#include <FXFileStream.h>

Inheritance diagram for FX::FXFileStream:

Inheritance graph
[legend]

List of all members.


Detailed Description

Deprecated:
For compatibility with FOX code only

Public Types

enum  ByteOrder { BigEndian, LittleEndian }

Public Member Functions

FXDEPRECATEDEXT FXFileStream (const FXObject *cont=NULL)
bool open (const FXString &filename, FXStreamDirection save_or_load, FXuval size=8192)
virtual bool close ()
virtual ~FXFileStream ()
QIODevicedevice () const
void setDevice (QIODevice *dev)
FXDEPRECATEDEXT void unsetDevice ()
bool atEnd () const
int byteOrder () const
void setByteOrder (int b)
FXDEPRECATEDEXT FXStreamreadBytes (char *&s, FXuint &l)
FXStreamreadRawBytes (char *buffer, FXuval len)
FXStreamreadRawBytes (FXuchar *buffer, FXuval len)
FXDEPRECATEDEXT FXStreamwriteBytes (const char *s, FXuint l)
FXStreamwriteRawBytes (const char *buffer, FXuval len)
FXStreamwriteRawBytes (const FXuchar *buffer, FXuval len)
FXfval rewind (FXint amount)
FXDEPRECATEDEXT bool open (FXStreamDirection save_or_load, FXuval size=8192, FXuchar *data=NULL)
virtual FXDEPRECATEDEXT bool flush ()
FXDEPRECATEDEXT FXuval getSpace () const
FXDEPRECATEDEXT void setSpace (FXuval sp)
FXDEPRECATEDEXT FXStreamStatus status () const
bool eof () const
FXDEPRECATEDEXT void setError (FXStreamStatus err)
FXDEPRECATEDEXT FXStreamDirection direction () const
FXDEPRECATEDEXT const FXObjectcontainer () const
FXlong position () const
virtual bool position (FXlong offset, FXWhence whence=FXFromStart)
void swapBytes (FXint s)
bool swapBytes () const
void setBigEndian (bool big)
bool isBigEndian () const
FXStreamsave (const FXuchar *p, unsigned long n)
FXStreamsave (const FXchar *p, unsigned long n)
FXStreamsave (const FXushort *p, unsigned long n)
FXStreamsave (const FXshort *p, unsigned long n)
FXStreamsave (const FXuint *p, unsigned long n)
FXStreamsave (const FXint *p, unsigned long n)
FXStreamsave (const FXfloat *p, unsigned long n)
FXStreamsave (const FXdouble *p, unsigned long n)
FXStreamsave (const FXlong *p, unsigned long n)
FXStreamsave (const FXulong *p, unsigned long n)
FXStreamload (FXuchar *p, unsigned long n)
FXStreamload (FXchar *p, unsigned long n)
FXStreamload (FXushort *p, unsigned long n)
FXStreamload (FXshort *p, unsigned long n)
FXStreamload (FXuint *p, unsigned long n)
FXStreamload (FXint *p, unsigned long n)
FXStreamload (FXfloat *p, unsigned long n)
FXStreamload (FXdouble *p, unsigned long n)
FXStreamload (FXlong *p, unsigned long n)
FXStreamload (FXulong *p, unsigned long n)
FXStreamsaveObject (const FXObject *v)
FXStreamloadObject (FXObject *&v)
FXStreamaddObject (const FXObject *v)

Protected Member Functions

virtual FXuval writeBuffer (FXuval count)
virtual FXuval readBuffer (FXuval count)

Protected Attributes

FXHashhash
const FXObjectparent
FXuchar * begptr
FXuchar * endptr
FXuchar * wrptr
FXuchar * rdptr
FXlong pos
FXStreamDirection dir
FXStreamStatus code
FXuint seq
bool owns
bool swap
QIODevicedev

Friends

struct Generic::hasSerialise
struct Generic::hasDeserialise
FXStreamoperator<< (FXStream &s, const FXuchar &v)
FXStreamoperator<< (FXStream &s, const FXchar &v)
FXStreamoperator<< (FXStream &s, const FXushort &_v)
FXStreamoperator<< (FXStream &s, const FXshort &v)
FXStreamoperator<< (FXStream &s, const FXuint &_v)
FXStreamoperator<< (FXStream &s, const FXint &v)
FXStreamoperator<< (FXStream &s, const FXfloat &_v)
FXStreamoperator<< (FXStream &s, const FXdouble &_v)
FXStreamoperator<< (FXStream &s, const FXlong &v)
FXStreamoperator<< (FXStream &s, const FXulong &_v)
FXStreamoperator<< (FXStream &s, const char *v)
FXStreamoperator<< (FXStream &s, const bool &_v)
FXStreamoperator>> (FXStream &s, FXuchar &v)
FXStreamoperator>> (FXStream &s, FXchar &v)
FXStreamoperator>> (FXStream &s, FXushort &v)
FXStreamoperator>> (FXStream &s, FXshort &v)
FXStreamoperator>> (FXStream &s, FXuint &v)
FXStreamoperator>> (FXStream &s, FXint &v)
FXStreamoperator>> (FXStream &s, FXfloat &v)
FXStreamoperator>> (FXStream &s, FXdouble &v)
FXStreamoperator>> (FXStream &s, FXlong &v)
FXStreamoperator>> (FXStream &s, FXulong &v)
FXStreamoperator>> (FXStream &s, bool &v)

Constructor & Destructor Documentation

FXDEPRECATEDEXT FX::FXFileStream::FXFileStream ( const FXObject cont = NULL  ) 

Create file store.

virtual FX::FXFileStream::~FXFileStream (  )  [virtual]

Destructor.


Member Function Documentation

bool FX::FXFileStream::open ( const FXString filename,
FXStreamDirection  save_or_load,
FXuval  size = 8192 
)

Open binary data file stream; allocate a buffer of the given size for the file I/O; the buffer must be at least 16 bytes.

virtual bool FX::FXFileStream::close (  )  [virtual]

Close file store.

Reimplemented from FX::FXStream.

QIODevice* FX::FXStream::device (  )  const [inline, inherited]

Returns the i/o device this stream is using.

void FX::FXStream::setDevice ( QIODevice dev  )  [inherited]

Sets the i/o device this stream is using.

FXDEPRECATEDEXT void FX::FXStream::unsetDevice (  )  [inline, inherited]

Deprecated:
For Qt compatibility only

bool FX::FXStream::atEnd (  )  const [inline, inherited]

Returns true if there is no more data to be read.

int FX::FXStream::byteOrder (  )  const [inline, inherited]

Returns the byte order the data on the i/o device shall be interpreted in.

void FX::FXStream::setByteOrder ( int  b  )  [inline, inherited]

Sets the byte order the data on the i/o device shall be interpreted in.

FXDEPRECATEDEXT FXStream& FX::FXStream::readBytes ( char *&  s,
FXuint &  l 
) [inherited]

Deprecated:
For Qt compatibility only

FXStream& FX::FXStream::readRawBytes ( char *  buffer,
FXuval  len 
) [inline, inherited]

Reads preformatted byte data into the specified buffer.

FXDEPRECATEDEXT FXStream& FX::FXStream::writeBytes ( const char *  s,
FXuint  l 
) [inherited]

Deprecated:
For Qt compatibility only

FXStream& FX::FXStream::writeRawBytes ( const char *  buffer,
FXuval  len 
) [inline, inherited]

Writes preformatted byte data from the specified buffer.

FXfval FX::FXStream::rewind ( FXint  amount  )  [inherited]

Moves the file pointer backwards by the specified amount of bytes, returning the new file pointer.

virtual FXuval FX::FXStream::writeBuffer ( FXuval  count  )  [protected, virtual, inherited]

Write at least count bytes from the buffer; returns number of bytes available to be written.

virtual FXuval FX::FXStream::readBuffer ( FXuval  count  )  [protected, virtual, inherited]

Read at least count bytes into the buffer; returns number of bytes available to be read.

FXDEPRECATEDEXT bool FX::FXStream::open ( FXStreamDirection  save_or_load,
FXuval  size = 8192,
FXuchar *  data = NULL 
) [inherited]

Deprecated:
For FOX compatibility only
Open stream for reading (FXStreamLoad) or for writing (FXStreamSave). An initial buffer size may be given, which must be at least 16 bytes. If data is not NULL, it is expected to point to an external data buffer of length size; otherwise stream will use an internally managed buffer.

Reimplemented in FX::FXMemoryStream.

virtual FXDEPRECATEDEXT bool FX::FXStream::flush (  )  [virtual, inherited]

Deprecated:
For FOX compatibility only
Flush buffer

Reimplemented in FX::FXBZFileStream, and FX::FXGZFileStream.

FXDEPRECATEDEXT FXuval FX::FXStream::getSpace (  )  const [inherited]

Deprecated:
For FOX compatibility only
Get available buffer space

FXDEPRECATEDEXT void FX::FXStream::setSpace ( FXuval  sp  )  [inherited]

Deprecated:
For FOX compatibility only
Set available buffer space

FXDEPRECATEDEXT FXStreamStatus FX::FXStream::status (  )  const [inline, inherited]

Deprecated:
For FOX compatibility only
Get status code

bool FX::FXStream::eof (  )  const [inline, inherited]

Return true if at end of file or error.

FXDEPRECATEDEXT void FX::FXStream::setError ( FXStreamStatus  err  )  [inherited]

Deprecated:
For FOX compatibility only
Set status code

FXDEPRECATEDEXT FXStreamDirection FX::FXStream::direction (  )  const [inline, inherited]

Deprecated:
For FOX compatibility only
Obtain stream direction

FXDEPRECATEDEXT const FXObject* FX::FXStream::container (  )  const [inline, inherited]

Deprecated:
For FOX compatibility only
Get parent object

FXlong FX::FXStream::position (  )  const [inherited]

Get position.

virtual bool FX::FXStream::position ( FXlong  offset,
FXWhence  whence = FXFromStart 
) [virtual, inherited]

Move to position relative to head, tail, or current location.

void FX::FXStream::swapBytes ( FXint  s  )  [inline, inherited]

Change swap bytes flag. -1 sets machine default (ie; do swap on big endian machines).

bool FX::FXStream::swapBytes (  )  const [inline, inherited]

Get state of the swap bytes flag.

void FX::FXStream::setBigEndian ( bool  big  )  [inline, inherited]

Set stream to big endian mode if true. Byte swapping will be enabled if the machine native byte order is not equal to the desired byte order.

bool FX::FXStream::isBigEndian (  )  const [inline, inherited]

Return true if big endian mode.

FXStream& FX::FXStream::save ( const FXuchar *  p,
unsigned long  n 
) [inline, inherited]

Save arrays of items to stream.

FXStream& FX::FXStream::load ( FXuchar *  p,
unsigned long  n 
) [inline, inherited]

Load arrays of items from stream.

FXStream& FX::FXStream::saveObject ( const FXObject v  )  [inherited]

Save object.

FXStream& FX::FXStream::loadObject ( FXObject *&  v  )  [inherited]

Load object.

FXStream& FX::FXStream::addObject ( const FXObject v  )  [inherited]

Add object without saving or loading.


Friends And Related Function Documentation

FXStream& operator<< ( FXStream s,
const FXuchar &  v 
) [friend, inherited]

Save single items to stream.

FXStream& operator>> ( FXStream s,
FXuchar &  v 
) [friend, inherited]

Load single items from stream.


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 21:59:08 2008 for TnFOX by doxygen v1.5.6