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

Google


Objective Systems, Inc.

ASN1XEREncodeBuffer Class Reference
[XER Message Buffer Classes]

#include <asn1XerCppTypes.h>

Inheritance diagram for ASN1XEREncodeBuffer:

ASN1XERMessageBuffer List of all members.

Detailed Description

The ANS1XEREncodeBuffer 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.


Public Member Functions

 ASN1XEREncodeBuffer ()
 ASN1XEREncodeBuffer (ASN1BOOL canonical)
 ASN1XEREncodeBuffer (ASN1BOOL canonical, ASN1CTXT *pSrcCtxt, size_t initBufSize=0)
 ASN1XEREncodeBuffer (ASN1OCTET *pMsgBuf, size_t msgBufLen)
 ASN1XEREncodeBuffer (ASN1OCTET *pMsgBuf, size_t msgBufLen, ASN1BOOL canonical, ASN1BOOL openType=FALSE)
size_t getMsgLen ()
int init ()
virtual ASN1BOOL isA (Type bufferType)
void setCanonical ()
void setOpenType ()
long write (const char *filename)
long write (FILE *fp)


Constructor & Destructor Documentation

ASN1XEREncodeBuffer::ASN1XEREncodeBuffer  ) 
 

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

ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ASN1BOOL  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 ASN1BOOL  canonical,
ASN1CTXT *  pSrcCtxt,
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).
pSrcCtxt Source context; its memory heap will be used.
initBufSize Initial size of encode buffer

ASN1XEREncodeBuffer::ASN1XEREncodeBuffer ASN1OCTET *  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 ASN1OCTET *  pMsgBuf,
size_t  msgBufLen,
ASN1BOOL  canonical,
ASN1BOOL  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 (ASN_OK) = success,
  • negative return value is error.

virtual ASN1BOOL 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.

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:

Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 8 Sep 2005.
ASN1C XER Runtime, ASN1C v5.8x