class OSRTCtxtHolder : public 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 | |
---|---|
EXTRTMETHOD OSRTCtxtPtr | getContext () |
EXTRTMETHOD OSCTXT * | getCtxtPtr () |
EXTRTMETHOD char * | getErrorInfo () |
EXTRTMETHOD char * | getErrorInfo (char *, size_t &) |
EXTRTMETHOD int | getStatus () |
EXTRTMETHOD void | printErrorInfo () |
EXTRTMETHOD void | resetErrorInfo () |
Protected Member Functions | |
---|---|
OSRTCtxtHolder ( OSRTContext *) | |
~OSRTCtxtHolder () |
Inherited Functions | |
---|---|
OSRTCtxtHolderIF::~OSRTCtxtHolderIF() |
Protected Attributes | |
---|---|
OSRTCtxtPtr | mpContext |
EXTRTMETHOD | OSRTCtxtHolder | ( | OSRTContext * | pContext = 0 | ) | [protected] |
The protected constructor creates a new context and sets the buffer class type.
OSRTContext * pContext = 0 | Pointer to a context to use. If NULL, new context will be allocated. |
EXTRTMETHOD OSRTCtxtPtr | getContext | ( | ) | [virtual] |
The getContext method returns the underlying context smart-pointer object.
EXTRTMETHOD OSCTXT * | getCtxtPtr | ( | ) | [virtual] |
The getCtxtPtr method returns the underlying C runtime context. This context can be used in calls to C runtime functions.
EXTRTMETHOD char * | getErrorInfo | ( | ) | [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 []'.
EXTRTMETHOD char * | getErrorInfo | ( | char * | pBuf, |
size_t & | bufSize | |||
) | [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 []'.
char * pBuf | A pointer to a destination buffer to obtain the error text. If NULL, dynamic buffer will be allocated. |
size_t & bufSize | A reference to buffer size. If pBuf is NULL it will receive the size of allocated dynamic buffer. |
EXTRTMETHOD int | getStatus | ( | ) | const [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.
EXTRTMETHOD void | printErrorInfo | ( | ) | [virtual] |
The printErrorInfo method prints information on errors contained within the context.
EXTRTMETHOD void | resetErrorInfo | ( | ) | [virtual] |
The resetErrorInfo method resets information on errors contained within the context.
OSRTCtxtPtr | mpContext | [protected] |
The mpContext member variable holds a reference-counted C runtime variable. This context is used in calls to all C run-time functions.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.