ASN1XEREncodeBuffer Class Reference
[XER Message Buffer Classes]

#include <asn1XerCppTypes.h>

Inheritance diagram for ASN1XEREncodeBuffer:
ASN1XERMessageBuffer ASN1XEREncodeStream ASN1XERShdMemHpEncBuf

List of all members.

Public Member Functions

 ASN1XEREncodeBuffer ()
 ASN1XEREncodeBuffer (OSBOOL canonical)
 ASN1XEREncodeBuffer (OSBOOL canonical, OSRTContext *pContext, size_t initBufSize=0)
 ASN1XEREncodeBuffer (OSOCTET *pMsgBuf, size_t msgBufLen)
 ASN1XEREncodeBuffer (OSOCTET *pMsgBuf, size_t msgBufLen, OSBOOL canonical, OSBOOL openType=FALSE)
size_t getMsgLen ()
int init ()
virtual OSBOOL isA (Type bufferType)
void setCanonical ()
void setOpenType ()
long write (const char *filename)
long write (FILE *fp)

Detailed Description

The ASN1XEREncodeBuffer class is derived from the ASN1XERMessageBuffer base class. It contains variables and methods specific to encoding ASN.1 messages using the XML Encoding Rules (XER). It is used to manage the buffer into which an ASN.1 message is to be encoded.


Constructor & Destructor Documentation

ASN1XEREncodeBuffer::ASN1XEREncodeBuffer (  ) 

Default constructor Use getStatus() method to determine has error occured during the initialization or not.

ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ( OSBOOL  canonical  ) 

A constructor. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
canonical Indicates the usage of Canonical XER(CXER).
ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ( OSBOOL  canonical,
OSRTContext *  pContext,
size_t  initBufSize = 0 
)

A constructor. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
canonical Indicates the usage fo Canonical XER(CXER).
pContext Pointer to existing context to reference.
initBufSize Initial size of encode buffer
ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ( OSOCTET *  pMsgBuf,
size_t  msgBufLen 
)

A constructor. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
pMsgBuf A pointer to a fixed size message buffer to receive the encoded message.
msgBufLen Size of the fixed-size message buffer.
ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ( OSOCTET *  pMsgBuf,
size_t  msgBufLen,
OSBOOL  canonical,
OSBOOL  openType = FALSE 
)

A constructor. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
pMsgBuf A pointer to a fixed size message buffer to receive the encoded message.
msgBufLen Size of the fixed-size message buffer.
canonical Indicates the usage fo Canonical XER(CXER).
openType Open Type encoding indicator. Set this argument as TRUE to encode an open type.

Member Function Documentation

size_t ASN1XEREncodeBuffer::getMsgLen (  )  [inline]

This method returns the length of a previously encoded XER message.

Returns:
len Length of the XER message encapsulated within this buffer object.
int ASN1XEREncodeBuffer::init (  ) 

This method reinitializes the encode buffer pointer to allow a new message to be encoded. This makes it possible to reuse one message buffer object in a loop to encode multiple messages. After this method is called, any previously encoded message in the buffer will be overwritten on the next encode call.

Returns:
Completion status of operation:
  • 0 (0) = success,
  • negative return value is error.
virtual OSBOOL ASN1XEREncodeBuffer::isA ( Type  bufferType  )  [inline, virtual]

This method checks the type of the message buffer.

Parameters:
bufferType Enumerated identifier specifying a derived class. The only possible value for this class is XEREncode.
Returns:
Boolean result of the match operation. True if this is the class corresponding to the identifier argument.

Reimplemented in ASN1XEREncodeStream.

void ASN1XEREncodeBuffer::setCanonical (  )  [inline]

This method turns Canonical XML Encoding Rules (CXER) usage on.

void ASN1XEREncodeBuffer::setOpenType (  )  [inline]

This method turns Open Type encoding on.

long ASN1XEREncodeBuffer::write ( FILE *  fp  ) 

The second version writes to a file that is specified by a FILE pointer.

Parameters:
fp The pointer to FILE structure for writing the encoded message.
Returns:
Number of octets actually written, which may be less than real message length if an error occurs.
long ASN1XEREncodeBuffer::write ( const char *  filename  ) 

There are two versions of this method. The first version writes to a file that is specified by file name.

Parameters:
filename The name of file for writing the encoded message.
Returns:
Number of octets actually written, which may be less than real message length if an error occurs.

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