Home > Support > Documentation

rtSaxCppAny.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2008 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
00022  *
00023  *****************************************************************************/
00027 #ifndef _RTSAXCPPANY_H_
00028 #define _RTSAXCPPANY_H_
00029 
00030 #include "rtxsrc/OSRTContext.h"
00031 #include "rtxmlsrc/osrtxml.h"
00032 #include "rtxmlsrc/rtSaxCppParser.h"
00033 #include "rtxmlsrc/rtXmlCppMsgBuf.h"
00034 #ifndef ASN1RT
00035 #include "rtxsrc/rtxCppXmlString.h"
00036 #include "rtxmlsrc/OSXSDAnyTypeClass.h"
00037 #include "rtxmlsrc/rtSaxCppAnyType.h"
00038 #endif
00039 
00040 class EXTERNXML OSXMLAnyHandler : public OSXMLDefaultHandler {
00041  private:
00042    OSRTContext mEncCtxt;
00043 #ifdef ASN1RT
00044    const OSUTF8CHAR** mppMsgData;
00045 #else // XBinder
00046    OSXMLStringClass* mpAnyMsgData;
00047    OSXSDAnyTypeClass* mpAnyTypeMsgData;
00048 #endif
00049    void   localInit (OSRTContext* pContext);
00050    OSBOOL isEmptyElement (const OSUTF8CHAR* qname);
00051    OSXMLAnyHandler& operator= (const OSXMLAnyHandler&);
00052 
00053  public:
00054 #ifdef ASN1RT
00055    OSXMLAnyHandler 
00056       (const OSUTF8CHAR** ppMsgData, OSRTContext* pContext, int level = 0);
00057 
00058    OSXMLAnyHandler 
00059       (const OSUTF8CHAR** ppMsgData, OSRTContext* pContext, 
00060        const OSUTF8CHAR* elemName);
00061 #else // XBinder
00062    OSXMLAnyHandler 
00063       (OSXSDAnyTypeClass& msgData, OSRTContext* pContext, int level = 0);
00064 
00065    OSXMLAnyHandler 
00066       (OSXSDAnyTypeClass& msgData, OSRTContext* pContext, 
00067        const OSUTF8CHAR* elemName);
00068 
00069    // xsd:any
00070    OSXMLAnyHandler 
00071       (OSXMLStringClass& msgData, OSRTContext* pContext, int level = 0);
00072 
00073    OSXMLAnyHandler 
00074       (OSXMLStringClass& msgData, OSRTContext* pContext, 
00075        const OSUTF8CHAR* elemName);
00076 #endif
00077    ~OSXMLAnyHandler ();
00078 
00079    virtual int startElement 
00080       (const OSUTF8CHAR* const uri, 
00081        const OSUTF8CHAR* const localname, 
00082        const OSUTF8CHAR* const qname, 
00083        const OSUTF8CHAR* const* attrs);
00084 
00085    virtual int characters 
00086       (const OSUTF8CHAR* const chars, OSUINT32 length);
00087 
00088    virtual int endElement
00089       (const OSUTF8CHAR* const uri,
00090        const OSUTF8CHAR* const localname,
00091        const OSUTF8CHAR* const qname);
00092 } ;
00093 
00094 #endif /* _RTSAXCPPANY_H_ */