OSRTCtxtHolderIF Class Reference
Abstract message buffer or stream interface class. More...
#include <OSRTCtxtHolderIF.h>
Inheritance diagram for OSRTCtxtHolderIF:
![](classOSRTCtxtHolderIF.png)
Public Member Functions | |
virtual OSRTCtxtPtr | getContext ()=0 |
The getContext method returns the underlying context smart-pointer object. | |
virtual OSCTXT * | getCtxtPtr ()=0 |
The getCtxtPtr method returns the underlying C runtime context. | |
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 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. | |
Protected Member Functions | |
virtual | ~OSRTCtxtHolderIF () |
The virtual destructor does nothing. |
Detailed Description
Abstract message buffer or stream interface class.This is the base class for both the in-memory message buffer classes and the run-time stream classes.
Definition at line 38 of file OSRTCtxtHolderIF.h.
Constructor & Destructor Documentation
virtual OSRTCtxtHolderIF::~OSRTCtxtHolderIF | ( | ) | [inline, protected, virtual] |
The virtual destructor does nothing.
It is overridden by derived versions of this class.
Definition at line 44 of file OSRTCtxtHolderIF.h.
Member Function Documentation
virtual OSRTCtxtPtr OSRTCtxtHolderIF::getContext | ( | ) | [pure virtual] |
The getContext method returns the underlying context smart-pointer object.
- Returns:
- Context smart pointer object.
Implemented in OSRTCtxtHolder, OSRTInputStream, OSRTMessageBuffer, OSRTOutputStream, and OSRTStream.
virtual OSCTXT* OSRTCtxtHolderIF::getCtxtPtr | ( | ) | [pure virtual] |
The getCtxtPtr method returns the underlying C runtime context.
This context can be used in calls to C runtime functions.
- Returns:
- The pointer to C runtime context.
Implemented in OSRTCtxtHolder, OSRTInputStream, OSRTMessageBuffer, OSRTOutputStream, and OSRTStream.
virtual char* OSRTCtxtHolderIF::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 OSRTCtxtHolder, OSRTInputStream, OSRTMessageBuffer, OSRTOutputStream, and OSRTStream.
virtual char* OSRTCtxtHolderIF::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 occurred.
Implemented in OSRTCtxtHolder, OSRTInputStream, OSRTMessageBuffer, OSRTOutputStream, and OSRTStream.
virtual int OSRTCtxtHolderIF::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. If error occurs, use printErrorInfo method to print out the error's description and stack trace. Method resetError can be used to reset error to continue operations after recovering from the error.
- Returns:
- Runtime status code:
- 0 (0) = success,
- negative return value is error.
Implemented in OSRTCtxtHolder, OSRTInputStream, OSRTMessageBuffer, OSRTOutputStream, and OSRTStream.
The documentation for this class was generated from the following file: