/////////////////////////////////////////////////////////////////////////////
// Name: stream.h
-// Purpose: documentation for wxCountingOutputStream class
+// Purpose: interface of wxCountingOutputStream
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
};
+
/**
@class wxBufferedInputStream
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxStreamBuffer, wxInputStream, wxBufferedOutputStream
+ @see wxStreamBuffer, wxInputStream, wxBufferedOutputStream
*/
class wxBufferedInputStream : public wxFilterInputStream
{
};
+
/**
@class wxStreamBuffer
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxStreamBase
+ @see wxStreamBase
*/
class wxStreamBuffer
{
buffer continues to be used, trying to call functions in the (destroyed)
stream. It is advised to use this feature only in very local area of the
program.
-
+
@see @ref setbufferio() wxStreamBuffer:SetBufferIO
*/
wxStreamBuffer(wxStreamBase& stream, BufMode mode);
@e flushable. This flag allows (when it has the @false value) or forbids
(when it has the @true value) the stream buffer to resize dynamically the IO
buffer.
-
+
@see SetBufferIO()
*/
void Fixed(bool fixed);
/**
Gets a single char from the stream buffer. It acts like the Read call.
-
+
@see Read()
*/
char GetChar();
/**
Puts a single char to the stream buffer.
-
+
@see Read()
*/
void PutChar(char c);
Copies data to @e buffer. The function returns when @a buffer is full or when
there isn't
any more data in the current buffer.
-
+
@see Write()
*/
size_t Read(void* buffer, size_t size);
/**
Changes the current position.
@a mode may be one of the following:
-
+
@b wxFromStart
-
+
The position is counted from the start of the stream.
-
+
@b wxFromCurrent
-
+
The position is counted from the current position of the stream.
-
+
@b wxFromEnd
-
+
The position is counted from the end of the stream.
-
+
@returns Upon successful completion, it returns the new offset as
measured in bytes from the beginning of the stream.
Otherwise, it returns wxInvalidOffset.
/**
Destroys or invalidates the previous IO buffer and allocates a new one of the
specified size.
-
+
@see Fixed(), Flushable()
*/
void SetBufferIO(char* buffer_start, char* buffer_end);
the @e real position in the stream and from the internal buffer position: so
it gives you the position in the @e real stream counted from the start of
the stream.
-
+
@returns Returns the current position in the stream if possible,
wxInvalidOffset in the other case.
*/
};
+
/**
@class wxOutputStream
@wxheader{stream.h}
/**
Changes the stream current position.
-
+
@param pos
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
+
@returns The new stream position or wxInvalidOffset on error.
*/
off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart);
};
+
/**
@class wxFilterClassFactory
@wxheader{stream.h}
@library{wxbase}
@category{FIXME}
- @seealso
- wxFilterInputStream, wxFilterOutputStream, wxArchiveClassFactory, @ref
+ @see wxFilterInputStream, wxFilterOutputStream, wxArchiveClassFactory, @ref
overview_wxarc "Archive formats such as zip"
*/
class wxFilterClassFactory : public wxObject
/**
GetFirst and GetNext can be used to enumerate the available factories.
For example, to list them:
-
+
GetFirst()/GetNext() return a pointer to a factory or @NULL if no more
are available. They do not give away ownership of the factory.
*/
};
+
/**
@class wxFilterOutputStream
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxFilterClassFactory, wxFilterInputStream
+ @see wxFilterClassFactory, wxFilterInputStream
*/
class wxFilterOutputStream : public wxOutputStream
{
};
+
/**
@class wxFilterInputStream
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxFilterClassFactory, wxFilterOutputStream
+ @see wxFilterClassFactory, wxFilterOutputStream
*/
class wxFilterInputStream : public wxInputStream
{
};
+
/**
@class wxBufferedOutputStream
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxStreamBuffer, wxOutputStream
+ @see wxStreamBuffer, wxOutputStream
*/
class wxBufferedOutputStream : public wxFilterOutputStream
{
};
+
/**
@class wxInputStream
@wxheader{stream.h}
/**
Reads data from the input queue and stores it in the specified output stream.
The data is read until an error is raised by one of the two streams.
-
+
@returns This function returns a reference on the current object, so the
user can test any states of the stream right away.
*/
/**
Changes the stream current position.
-
+
@param pos
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
+
@returns The new stream position or wxInvalidOffset on error.
*/
off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart);
};
+
/**
@class wxStreamBase
@wxheader{stream.h}
@library{wxbase}
@category{streams}
- @seealso
- wxStreamBuffer
+ @see wxStreamBuffer
*/
class wxStreamBase
{
/**
This function returns the last error.
-
+
@b wxSTREAM_NO_ERROR
-
+
No error occurred.
-
+
@b wxSTREAM_EOF
-
+
An End-Of-File occurred.
-
+
@b wxSTREAM_WRITE_ERROR
-
+
A generic error occurred on the last write call.
-
+
@b wxSTREAM_READ_ERROR
-
+
A generic error occurred on the last read call.
*/
wxStreamError GetLastError() const;
Returns the length of the stream in bytes. If the length cannot be determined
(this is always the case for socket streams for example), returns
@c wxInvalidOffset.
- This function is new since wxWidgets version 2.5.4
+
+ @wxsince{2.5.4}
*/
wxFileOffset GetLength() const;
/**
Returns @true if no error occurred on the stream.
-
+
@see GetLastError()
*/
virtual bool IsOk() const;
*/
size_t OnSysWrite(const void* buffer, size_t bufsize);
};
+