|
|
 |
 |
|
OSStream Class ReferenceThe base class for streams.
More...
#include <rtxCppStream.h>
Inheritance diagram for OSStream:
List of all members.
|
Public Member Functions |
| virtual | ~OSStream () |
| | Virtual destructor.
|
| virtual int | close () |
| | Closes the input or output stream and releases any system resources associated with the stream.
|
| virtual int | flush () |
| | Flushes the buffered data to the stream.
|
| virtual OSCtxtPtr | getContext () |
| | This method returns a pointer to the underlying OSContext object.
|
| virtual OSCTXT * | getCtxtPtr () |
| | This method returns a pointer to the underlying OSCTXT object.
|
| virtual char * | getErrorInfo () |
| | Returns error text in a dynamic memory buffer.
|
| virtual char * | getErrorInfo (char *pBuf, size_t &bufSize) |
| | Returns error text in a memory buffer.
|
| int | getStatus () const |
| | This method returns the completion status of previous operation.
|
|
OSBOOL | isInitialized () |
| virtual OSBOOL | isOpened () |
| | Checks, is the stream opened or not.
|
|
void | printErrorInfo () |
| | The printErrorInfo method prints information on errors contained within the context.
|
|
void | resetErrorInfo () |
| | The resetErrorInfo method resets information on errors contained within the context.
|
Protected Member Functions |
| | OSStream () |
| | The default constructor.
|
Protected Attributes |
|
OSCtxtPtr | mpContext |
| | Pointer to a context structure.
|
|
OSBOOL | mbAttached |
| | Flag, TRUE for "attached" streams.
|
|
int | mStatus |
| | Last stream operation status.
|
|
int | mInitStatus |
| | Initialization status. 0 if initialized successfully.
|
Detailed Description
The base class for streams.
Definition at line 37 of file rtxCppStream.h.
Constructor & Destructor Documentation
| OSStream::OSStream |
( |
|
) |
[protected] |
|
|
|
The default constructor.
It initializes a buffered stream. A buffered stream maintains data in memory before reading or writing to the device. This generally provides better performance than an unbuffered stream. |
| virtual OSStream::~OSStream |
( |
|
) |
[virtual] |
|
|
|
Virtual destructor.
Closes the stream if it was opened. |
Member Function Documentation
| virtual int OSStream::close |
( |
|
) |
[virtual] |
|
|
|
Closes the input or output stream and releases any system resources associated with the stream.
For output streams this function also flushes all internal buffers to the stream.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
- See also:
- rtxStreamClose
Implements OSStreamIF.
Reimplemented in OSInputStream, and OSOutputStream. |
| virtual int OSStream::flush |
( |
|
) |
[virtual] |
|
|
|
Flushes the buffered data to the stream.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
- See also:
- rtxStreamFlush
Implements OSStreamIF.
Reimplemented in OSInputStream, and OSOutputStream. |
| virtual OSCtxtPtr OSStream::getContext |
( |
|
) |
[inline, virtual] |
|
| virtual OSCTXT* OSStream::getCtxtPtr |
( |
|
) |
[inline, virtual] |
|
| virtual char* OSStream::getErrorInfo |
( |
char * |
pBuf, |
|
|
size_t & |
bufSize |
|
) |
[inline, virtual] |
|
|
|
Returns error text in a memory buffer.
If buffer pointer is specified in parameters (not NULL) then error text will be copied in the passed buffer. Otherwise, this method allocates memory using the 'operator new []' function. The calling routine is responsible to free the memory by using 'operator delete []'.
- Parameters:
-
| pBuf | A pointer to a destination buffer to obtain the error text. If NULL, dynamic buffer will be allocated. |
| bufSize | A reference to buffer size. If pBuf is NULL it will receive the size of allocated dynamic buffer. |
- Returns:
- A pointer to a buffer with error text. If pBuf is not NULL, the return pointer will be equal to it. Otherwise, returns newly allocated buffer with error text. NULL, if error occured.
Implements OSStreamIF.
Reimplemented in OSInputStream, and OSOutputStream.
Definition at line 134 of file rtxCppStream.h. |
| virtual char* OSStream::getErrorInfo |
( |
|
) |
[inline, virtual] |
|
| int OSStream::getStatus |
( |
|
) |
const [inline, virtual] |
|
| virtual OSBOOL OSStream::isOpened |
( |
|
) |
[virtual] |
|
|
|
Checks, is the stream opened or not.
- Returns:
- TRUE, if the stream is opened, FALSE otherwise.
- See also:
- rtxStreamIsOpened
Implements OSStreamIF.
Reimplemented in OSInputStream, and OSOutputStream. |
The documentation for this class was generated from the following file:
|
This file was last modified on
8 Jan 2007. XBinder, Version 1.1.9 |