ASN1XERDecodeBuffer Class Reference
[XER Message Buffer Classes]
#include <asn1XerCppTypes.h>
Public Member Functions | |
ASN1XERDecodeBuffer (const char *xmlFile) | |
ASN1XERDecodeBuffer (const OSOCTET *msgbuf, size_t numocts, OSBOOL openType=FALSE) | |
ASN1XERDecodeBuffer (OSRTInputStreamIF &inputStream, OSBOOL openType=FALSE) | |
virtual int | decodeXML (OSXMLReaderClass *pReader) |
const char * | getXmlFileName () |
virtual int | initBuffer (OSRTMEMBUF &membuf) |
virtual int | initBuffer (const OSUTF8CHAR *str) |
virtual int | initBuffer (OSUNICHAR *str) |
virtual OSBOOL | isA (int bufferType) |
void | setOpenType () |
Protected Types | |
enum | { INPUT_FILE, INPUT_STREAM, INPUT_STREAM_ATTACHED, INPUT_MEMORY } |
Protected Attributes | |
union { | |
const char * fileName | |
OSRTInputStreamIF * pInputStream | |
struct { | |
const OSOCTET * pMemBuf | |
int bufSize | |
} memBuf | |
} | mInput |
enum ASN1XERDecodeBuffer:: { ... } | mInputId |
Detailed Description
The ANS1XERDecodeBuffer class is derived from the ASN1XERMessageBuffer base class. It contains variables and methods specific to decoding ASN.1 XER messages. It is used to manage the input buffer containing an ASN.1 message to be decoded.
Note that the XER decode buffer object does not take a message buffer argument because buffer management is handled by the XML parser.
Constructor & Destructor Documentation
ASN1XERDecodeBuffer::ASN1XERDecodeBuffer | ( | const char * | xmlFile | ) |
The ASN1XERDecodeBuffer class has three overloaded constructors. This version of the ASN1XERDecodeBuffer constructor takes a name of a file that contains the XML data to be decoded, and constructs a buffer. Use getStatus() method to determine has error occured during the initialization or not.
- Parameters:
-
xmlFile A pointer to name of file to be decoded.
ASN1XERDecodeBuffer::ASN1XERDecodeBuffer | ( | const OSOCTET * | msgbuf, | |
size_t | numocts, | |||
OSBOOL | openType = FALSE | |||
) |
This version of the ASN1XERDecodeBuffer constructor takes parameters describing the message to be decoded, and constructs a buffer describing an encoded ASN.1 message. Use getStatus() method to determine has error occured during the initialization or not.
- Parameters:
-
msgbuf A pointer to a buffer containing an encoded ASN.1 message. numocts Size of the message buffer. openType Open Type decoding indicator. Set this argument as TRUE to decode an open type.
ASN1XERDecodeBuffer::ASN1XERDecodeBuffer | ( | OSRTInputStreamIF & | inputStream, | |
OSBOOL | openType = FALSE | |||
) |
This version of the ASN1XERDecodeBuffer constructor takes a reference to the OSRTInputStream object. Use getStatus() method to determine has error occured during the initialization or not.
- Parameters:
-
inputStream reference to the OSRTInputStream object openType Open Type decoding indicator. Set this argument as TRUE to decode an open type.
Member Function Documentation
virtual int ASN1XERDecodeBuffer::decodeXML | ( | OSXMLReaderClass * | pReader | ) | [virtual] |
This method decodes an XML message associated with this buffer.
- Returns:
- stat Status of the operation. Possible values are 0 if successful or one of the negative error status codes defined in Appendix A of the C/C++ runtime Common Functions Reference Manual.
- Parameters:
-
pReader Pointer to OSXMLReaderClass object.
const char* ASN1XERDecodeBuffer::getXmlFileName | ( | ) | [inline] |
This method returns the name of the XML file that is associated with the current buffer.
- Returns:
- Name of the XML file that is associated with the current buffer.
virtual int ASN1XERDecodeBuffer::initBuffer | ( | OSUNICHAR * | str | ) | [inline, virtual] |
This version of the overloaded initBuffer method initializes the message buffer to point at the given Unicode string. This is used mainly for XER (XML) message decoding.
- Parameters:
-
str Pointer to a Unicode character string.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
virtual int ASN1XERDecodeBuffer::initBuffer | ( | const OSUTF8CHAR * | str | ) | [virtual] |
This version of the overloaded initBuffer method initializes the message buffer to point at the given null-terminated UTF-8 character string.
- Parameters:
-
str Pointer to a null-terminated ASCII character string.
- Returns:
- Completion status of operation:
- 0 (0) = success,
- negative return value is error.
virtual int ASN1XERDecodeBuffer::initBuffer | ( | OSRTMEMBUF & | membuf | ) | [inline, virtual] |
This method reinitializes the decode buffer pointer to allow new data to be decoded. This makes it possible to reuse one message buffer object in a loop to decode multiple data messages.
- Returns:
- Status of the operation. Possible values are 0 if successful or one of the negative error status codes defined in Appendix A of the C/C++ Run-time Common Functions Reference Manual.
- Parameters:
-
membuf reference to OSMemBuf object.
The documentation for this class was generated from the following file: