OSRTCtxtHolderIF Class Reference

class OSRTCtxtHolderIF

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.

Public Member Functions
OSRTCtxtPtr getContext()
OSCTXT *getCtxtPtr()
char *getErrorInfo()
char *getErrorInfo(char *, size_t &)
intgetStatus()
voidprintErrorInfo()
voidresetErrorInfo()
Protected Member Functions
~OSRTCtxtHolderIF()

Constructor & Destructor Documentation

~OSRTCtxtHolderIF()

~OSRTCtxtHolderIF()[protected, inline, virtual]

The virtual destructor does nothing. It is overridden by derived versions of this class.

Member Functions Documentation

getContext()

OSRTCtxtPtr getContext()[pure virtual]

The getContext method returns the underlying context smart-pointer object.

getCtxtPtr()

OSCTXT *getCtxtPtr()[pure virtual]

The getCtxtPtr method returns the underlying C runtime context. This context can be used in calls to C runtime functions.

getErrorInfo()

char *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 []'.

getErrorInfo(char *, size_t &)

char *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

char * pBufA pointer to a destination buffer to obtain the error text. If NULL, dynamic buffer will be allocated.
size_t & bufSizeA reference to buffer size. If pBuf is NULL it will receive the size of allocated dynamic buffer.

getStatus()

intgetStatus()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.

printErrorInfo()

voidprintErrorInfo()[pure virtual]

The printErrorInfo method prints information on errors contained within the context.

resetErrorInfo()

voidresetErrorInfo()[pure virtual]

The resetErrorInfo method resets information on errors contained within the context.