OSRTStream Class Reference
[ASN.1 Stream Classes]
The default base class for using I/O streams.
More...
#include <OSRTStream.h>
Inheritance diagram for OSRTStream:

Public Member Functions | |
| virtual EXTRTMETHOD | ~OSRTStream () |
| Virtual destructor. | |
| virtual EXTRTMETHOD int | close () |
| Closes the input or output stream and releases any system resources associated with the stream. | |
| virtual EXTRTMETHOD int | flush () |
| Flushes the buffered data to the stream. | |
| virtual OSRTCtxtPtr | getContext () |
| This method returns a pointer to the underlying OSRTContext 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 EXTRTMETHOD 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 | |
| EXTRTMETHOD | OSRTStream () |
| The default constructor. | |
Protected Attributes | |
| OSBOOL | mbAttached |
| Flag, TRUE for "attached" streams. | |
| int | mStatus |
| Last stream operation status. | |
| int | mInitStatus |
| Initialization status. 0 if initialized successfully. | |
Detailed Description
The default base class for using I/O streams.This class may be subclassed, as in the case of OSRTInputStream and OSRTOutputStream or other custom implementations.
Definition at line 44 of file OSRTStream.h.
Constructor & Destructor Documentation
|
|
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 destructor. Closes the stream if it was opened. |
Member Function Documentation
|
|
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.
Implements OSRTStreamIF. Reimplemented in OSRTInputStream, and OSRTOutputStream. |
|
|
Flushes the buffered data to the stream.
Implements OSRTStreamIF. Reimplemented in OSRTInputStream, and OSRTOutputStream. |
|
|
This method returns a pointer to the underlying OSRTContext object.
Reimplemented from OSRTCtxtHolder. Reimplemented in OSRTInputStream, and OSRTOutputStream. Definition at line 99 of file OSRTStream.h. References OSRTCtxtHolder::getContext(). Referenced by OSRTOutputStream::getContext(), and OSRTInputStream::getContext(). |
|
|
This method returns a pointer to the underlying OSCTXT object. This is the structure used in calls to low-level C encode/decode functions.
Reimplemented from OSRTCtxtHolder. Reimplemented in OSRTInputStream, and OSRTOutputStream. Definition at line 109 of file OSRTStream.h. References OSRTCtxtHolder::getCtxtPtr(). Referenced by OSRTOutputStream::getCtxtPtr(), and OSRTInputStream::getCtxtPtr(). |
|
||||||||||||
|
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 []'.
Reimplemented from OSRTCtxtHolder. Reimplemented in OSRTInputStream, and OSRTOutputStream. Definition at line 140 of file OSRTStream.h. References OSRTCtxtHolder::getErrorInfo(). |
|
|
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 []'.
Reimplemented from OSRTCtxtHolder. Reimplemented in OSRTInputStream, and OSRTOutputStream. Definition at line 120 of file OSRTStream.h. References OSRTCtxtHolder::getErrorInfo(). Referenced by OSRTOutputStream::getErrorInfo(), and OSRTInputStream::getErrorInfo(). |
|
|
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.
Reimplemented from OSRTCtxtHolder. Reimplemented in OSRTInputStream, and OSRTOutputStream. Definition at line 153 of file OSRTStream.h. Referenced by OSRTOutputStream::getStatus(), and OSRTInputStream::getStatus(). |
|
|
Checks, is the stream opened or not.
Implements OSRTStreamIF. Reimplemented in OSRTInputStream, and OSRTOutputStream. |
The documentation for this class was generated from the following file:
