ASN1C C/C++ Common Runtime
ASN1C v7.8.x
|
#include <OSRTStream.h>
Public Member Functions | |
virtual EXTRTMETHOD | ~OSRTStream () |
virtual EXTRTMETHOD int | close () |
virtual EXTRTMETHOD int | flush () |
virtual OSRTCtxtPtr | getContext () |
virtual OSCTXT * | getCtxtPtr () |
virtual char * | getErrorInfo () |
virtual char * | getErrorInfo (char *pBuf, size_t &bufSize) |
int | getStatus () const |
OSBOOL | isInitialized () |
virtual EXTRTMETHOD OSBOOL | isOpened () |
void | printErrorInfo () |
void | resetErrorInfo () |
Protected Member Functions | |
EXTRTMETHOD | OSRTStream (OSRTContext *pContext, OSBOOL attachStream=FALSE) |
EXTRTMETHOD | OSRTStream (OSRTStream &original) |
EXTRTMETHOD | OSRTStream () |
EXTRTMETHOD char * | getErrorInfo (size_t *pBufSize) |
Protected Attributes | |
OSRTCtxtHolder | mCtxtHolder |
OSBOOL | mbAttached |
int | mStatus |
int | mInitStatus |
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.
|
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 |
Virtual destructor. Closes the stream if it was opened.
|
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.
Reimplemented in OSRTOutputStream, and OSRTInputStream.
|
virtual |
Flushes the buffered data to the stream.
Reimplemented in OSRTInputStream, and OSRTOutputStream.
|
inlinevirtual |
This method returns a pointer to the underlying OSRTContext object.
Reimplemented in OSRTInputStream, and OSRTOutputStream.
Referenced by OSRTOutputStream::getContext(), and OSRTInputStream::getContext().
|
inlinevirtual |
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 in OSRTInputStream, and OSRTOutputStream.
Referenced by OSRTOutputStream::getCtxtPtr(), and OSRTInputStream::getCtxtPtr().
|
inlinevirtual |
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 in OSRTInputStream, and OSRTOutputStream.
Referenced by OSRTOutputStream::getErrorInfo(), and OSRTInputStream::getErrorInfo().
|
inlinevirtual |
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 []'.
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. |
Reimplemented in OSRTInputStream, and OSRTOutputStream.
|
inline |
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.
Referenced by OSRTOutputStream::getStatus(), and OSRTInputStream::getStatus().
|
virtual |
Checks, is the stream opened or not.
Reimplemented in OSRTInputStream, and OSRTOutputStream.
Referenced by OSRTInputStream::getStatus(), and OSRTOutputStream::isA().
|
inline |
The printErrorInfo method prints information on errors contained within the context.
Referenced by OSRTOutputStream::printErrorInfo(), and OSRTInputStream::printErrorInfo().
|
inline |
The resetErrorInfo method resets information on errors contained within the context.
Referenced by OSRTOutputStream::resetErrorInfo(), and OSRTInputStream::resetErrorInfo().