Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

OSMessageBuffer Class Reference

Abstract message buffer base class. More...

#include <rtxCppMsgBuf.h>

Inheritance diagram for OSMessageBuffer:

OSMessageBufferIF OSXMLMessageBuffer OSXMLDecodeBuffer OSXMLEncodeBuffer OSXMLEncodeStream List of all members.

Public Member Functions

virtual ~OSMessageBuffer ()
 The virtual destructor does nothing.
virtual OSCtxtPtr getContext ()
 The getContext method returns the underlying context smart-pointer object.
virtual OSCTXT * getCtxtPtr ()
 The getCtxtPtr method returns the underlying C runtime context.
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.
virtual OSOCTET * getMsgCopy ()
 The getMsgCopy method will return a copy of the encoded message managed by the object.
int getStatus () const
 This method returns the completion status of previous operation.
virtual const OSOCTET * getMsgPtr ()
 The getMsgPtr method will return a const pointer to the encoded message managed by the object.

Protected Member Functions

 OSMessageBuffer (Type bufferType, OSContext *pContext=0)
 The protected constructor creates a new context and sets the buffer class type.

Protected Attributes

OSCtxtPtr mpContext
 The mpContext member variable holds a reference-counted C runtime variable.
Type mBufferType
 The mBufferType member variable holds information on the derived message buffer class type (for example, XMLEncode).

Detailed Description

Abstract message buffer base class.

This class is used to manage an encode or decode message buffer. For encoding, this is the buffer into which the message is being built. For decoding, it describes a message that was read into memory to be decoded. Further classes are derived from this to handle encoding and decoding of messages for different encoding rules types.

Definition at line 45 of file rtxCppMsgBuf.h.


Constructor & Destructor Documentation

OSMessageBuffer::OSMessageBuffer Type  bufferType,
OSContext pContext = 0
[protected]
 

The protected constructor creates a new context and sets the buffer class type.

Parameters:
bufferType Type of message buffer that is being created (for example, XMLEncode).
pContext Pointer to a context to use. If NULL, new context will be allocated.

virtual OSMessageBuffer::~OSMessageBuffer  )  [inline, virtual]
 

The virtual destructor does nothing.

It is overridden by derived versions of this class.

Definition at line 75 of file rtxCppMsgBuf.h.


Member Function Documentation

virtual OSCTXT* OSMessageBuffer::getCtxtPtr  )  [inline, virtual]
 

The getCtxtPtr method returns the underlying C runtime context.

This context can be used in calls to C runtime functions.

Implements OSMessageBufferIF.

Definition at line 89 of file rtxCppMsgBuf.h.

virtual char* OSMessageBuffer::getErrorInfo char *  pBuf,
size_t &  bufSize
[inline, 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 occured.

Implements OSMessageBufferIF.

Definition at line 120 of file rtxCppMsgBuf.h.

virtual char* OSMessageBuffer::getErrorInfo  )  [inline, 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.

Implements OSMessageBufferIF.

Definition at line 100 of file rtxCppMsgBuf.h.

int OSMessageBuffer::getStatus  )  const [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.

Returns:
Runtime status code:
  • 0 = success,
  • negative return value is error.

Definition at line 141 of file rtxCppMsgBuf.h.


Member Data Documentation

OSCtxtPtr OSMessageBuffer::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.

Definition at line 51 of file rtxCppMsgBuf.h.


The documentation for this class was generated from the following file:

This file was last modified on 8 Jan 2007.
XBinder, Version 1.1.9