OSStreamIF Class ReferenceThe base interface for streams.
More...
#include <rtxCppStreamIF.h>
Inheritance diagram for OSStreamIF:
List of all members.
|
Public Member Functions |
| virtual | ~OSStreamIF () |
| | Virtual destructor.
|
| virtual int | close ()=0 |
| | Closes the input or output stream and releases any system resources associated with the stream.
|
| virtual int | flush ()=0 |
| | Flushes the buffered data to the stream.
|
| virtual OSCtxtPtr | getContext ()=0 |
| | This method returns a pointer to the underlying OSContext object.
|
| virtual OSCTXT * | getCtxtPtr ()=0 |
| | This method returns a pointer to the underlying OSCTXT object.
|
| virtual char * | getErrorInfo ()=0 |
| | Returns error text in a dynamic memory buffer.
|
| virtual char * | getErrorInfo (char *pBuf, size_t &bufSize)=0 |
| | Returns error text in a memory buffer.
|
| virtual int | getStatus () const =0 |
| | This method returns the completion status of previous operation.
|
| virtual OSBOOL | isOpened ()=0 |
| | Checks, is the stream opened or not.
|
|
virtual void | printErrorInfo ()=0 |
| | The printErrorInfo method prints information on errors contained within the context.
|
|
virtual void | resetErrorInfo ()=0 |
| | The resetErrorInfo method resets information on errors contained within the context.
|
Detailed Description
The base interface for streams.
Definition at line 37 of file rtxCppStreamIF.h.
Constructor & Destructor Documentation
| virtual OSStreamIF::~OSStreamIF |
( |
|
) |
[virtual] |
|
|
|
Virtual destructor.
Closes the stream if it was opened. |
Member Function Documentation
| virtual int OSStreamIF::close |
( |
|
) |
[pure 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
Implemented in OSInputStream, OSInputStreamIF, OSOutputStream, OSOutputStreamIF, and OSStream. |
| virtual int OSStreamIF::flush |
( |
|
) |
[pure virtual] |
|
| virtual OSCtxtPtr OSStreamIF::getContext |
( |
|
) |
[pure virtual] |
|
|
|
This method returns a pointer to the underlying OSContext object.
- Returns:
- A reference-counted pointer to an OSContext object. The OSContext object will not be released until all referenced-counted pointer variables go out of scope. This allows safe sharing of the context between different run-time classes.
Implemented in OSInputStream, OSOutputStream, and OSStream. |
| virtual OSCTXT* OSStreamIF::getCtxtPtr |
( |
|
) |
[pure virtual] |
|
| virtual char* OSStreamIF::getErrorInfo |
( |
char * |
pBuf, |
|
|
size_t & |
bufSize |
|
) |
[pure 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.
Implemented in OSInputStream, OSOutputStream, and OSStream. |
| virtual char* OSStreamIF::getErrorInfo |
( |
|
) |
[pure virtual] |
|
|
|
Returns error text in a dynamic memory buffer.
Buffer will be allocated by 'operator new []'. The calling routine is responsible to free the memory by using 'operator delete []'.
- Returns:
- A pointer to a newly allocated buffer with error text.
Implemented in OSInputStream, OSOutputStream, and OSStream. |
| virtual int OSStreamIF::getStatus |
( |
|
) |
const [pure virtual] |
|
|
|
This method returns the completion status of previous operation.
It can be used to check completion status of constructors or methods, which do not return completion status.
- Returns:
- Runtime status code:
- 0 = success,
- negative return value is error.
Implemented in OSInputStream, OSInputStreamIF, OSOutputStream, OSOutputStreamIF, and OSStream. |
| virtual OSBOOL OSStreamIF::isOpened |
( |
|
) |
[pure virtual] |
|
The documentation for this class was generated from the following file:
|