00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00030 #ifndef _ASN1XERENCODESTREAM_H_
00031 #define _ASN1XERENCODESTREAM_H_
00032
00033 #include "rtsrc/asn1CppTypes.h"
00034 #include "rtxsrc/OSRTOutputStreamIF.h"
00035 #include "rtxersrc/asn1XerCppTypes.h"
00036
00048 class EXTERNXER ASN1XEREncodeStream : public ASN1XEREncodeBuffer
00049 {
00050 protected:
00051 OSRTOutputStreamIF* mpStream;
00052 OSBOOL mbOwnStream;
00053 public:
00058 ASN1XEREncodeStream (OSRTOutputStreamIF& os, OSBOOL canonical = FALSE);
00059
00060 ASN1XEREncodeStream (OSRTOutputStreamIF* pos, OSBOOL bOwnStream = TRUE,
00061 OSBOOL canonical = FALSE);
00062
00063 ~ASN1XEREncodeStream ();
00064
00068 virtual void* getAppInfo () { return ASN1MessageBuffer::getAppInfo (); }
00069
00077 virtual OSRTCtxtPtr getContext () { return ASN1MessageBuffer::getContext (); }
00078
00085 virtual OSCTXT* getCtxtPtr () { return ASN1MessageBuffer::getCtxtPtr (); }
00086
00094 virtual char* getErrorInfo () { return ASN1MessageBuffer::getErrorInfo (); }
00095
00112 virtual char* getErrorInfo (char* pBuf, size_t& bufSize) {
00113 return ASN1MessageBuffer::getErrorInfo (pBuf, bufSize);
00114 }
00115
00129 virtual int getStatus () const { return ASN1MessageBuffer::getStatus (); }
00130
00135 virtual void printErrorInfo () { ASN1MessageBuffer::printErrorInfo (); }
00136
00141 virtual void resetErrorInfo () { ASN1MessageBuffer::resetErrorInfo (); }
00142
00146 virtual void setAppInfo (void* pAppInfo) {
00147 ASN1MessageBuffer::setAppInfo (pAppInfo);
00148 }
00149
00155 virtual void setDiag (OSBOOL value=TRUE) {
00156 ASN1MessageBuffer::setDiag (value);
00157 }
00158
00159
00170 virtual int close () { return mpStream->close (); }
00171
00180 virtual int flush () { return mpStream->flush (); }
00181
00187 virtual OSBOOL isOpened () { return mpStream->isOpened (); }
00188
00200 virtual long write (const OSOCTET* pdata, size_t size) {
00201 return mpStream->write (pdata, size);
00202 }
00203
00213 ASN1XEREncodeStream& operator << (ASN1CType& val);
00214
00223 int encodeObj (ASN1CType& val);
00224
00239 OSBOOL isA (Type bufferType);
00240 } ;
00241
00243 #endif
00244