#include <CATStream.h>
CATStream provides a generic stream interface class to be inherited by files, encrypted files, memory streams, and anything else that just needs basic read/write stream operations.
Definition at line 33 of file CATStream.h.
Public Types | |
enum | OPEN_MODE { READ_ONLY = 0x0, READ_WRITE_EXISTING_ONLY = 0x1, READ_WRITE_EXISTING_FIRST = 0x2, READ_WRITE_CREATE_TRUNC = 0x3, WRITE_CREATE_ONLY = 0x4, SHARE_ALL = 0x0, SHARE_NONE = 0x100 } |
Public Member Functions | |
CATStream () | |
virtual | ~CATStream () |
virtual CATResult | Open (const CATWChar *pathname, OPEN_MODE mode)=0 |
virtual CATResult | Close ()=0 |
virtual bool | IsOpen ()=0 |
virtual CATResult | Read (void *buffer, CATUInt32 &length)=0 |
virtual CATResult | Write (const void *buffer, CATUInt32 length)=0 |
virtual CATResult | ReadAbs (void *buffer, CATUInt32 &length, CATInt64 position)=0 |
virtual CATResult | WriteAbs (const void *buffer, CATUInt32 length, CATInt64 position)=0 |
virtual CATStream * | CreateSubStream (CATInt64 streamOffset, CATInt64 streamLength, CATSUBSTREAMBUILDER builder=CATStream::DefSubStreamBuilder, void *param1=0, CATUInt32 param2=0) |
virtual CATResult | ReleaseSubStream (CATStream *&subStream) |
virtual CATResult | Size (CATInt64 &filesize)=0 |
virtual bool | IsSeekable ()=0 |
virtual CATResult | SeekRelative (CATInt32 offset)=0 |
virtual CATResult | SeekAbsolute (CATInt64 position)=0 |
virtual CATResult | SeekFromEnd (CATInt32 offset)=0 |
virtual CATResult | GetPosition (CATInt64 &position)=0 |
virtual CATString | GetName () const =0 |
virtual CATResult | CopyToStream (CATStream *outputStream, CATUInt32 bufSize=kCAT_DEFAULT_STREAM_BUF_SIZE, CATInt64 offset=0, CATInt64 length=0) |
Copy from one stream to another using the specified buffer size. | |
Static Public Member Functions | |
static CATStream * | DefSubStreamBuilder (CATInt64 offset, CATInt64 length, CATStream *parent, void *param1, CATUInt32 param2) |
This is the default substream builder - it creates just CATStreamSub*'s. | |
Protected Attributes | |
CATUInt32 | fSubCount |
Private Types | |
typedef CATStream *(* | CATSUBSTREAMBUILDER )(CATInt64 offset, CATInt64 length, CATStream *parent, void *param1, CATUInt32 param2) |
Private Member Functions | |
CATStream & | operator= (const CATStream &stream) |