Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

WSDDDocumentExpat.h

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */
00016 
00017 #ifdef WIN32
00018 #pragma warning(disable : 4786)
00019 #endif
00020 
00021 #if !defined(__WSDDDOCUMENTEXPAT_H_INCLUDED__)
00022 #define __WSDDDOCUMENTEXPAT_H_INCLUDED__
00023 
00024 #include "WSDDDocument.h"
00025 #include <expat/expat.h>
00026 #include <string>
00027 #include <map>
00028 
00029 using namespace std;
00030 
00031 /*
00032  *  @class WSDDDocumentExpat
00033  *  @brief
00034  *  @author sanjaya sinharage(sanjaya@opensource.lk)
00035  *  @author Suasntha Kumara (skumara@virtusa.com, susantha@opensource.lk)
00036  */
00037 class WSDDDocumentExpat : public WSDDDocument
00038 {
00039 private:
00040     void ProcessAttributes(WSDDLevels ElementType, const XML_Ch **attrs);
00041     void GetParameters(WSDDLevels ElementType, const XML_Ch **attrs);
00042     void AddAllowedRolesToService(const AxisXMLCh* value);
00043     void AddAllowedMethodsToService(const AxisXMLCh* value);
00044     int ParseDocument(const AxisChar* sWSDD);
00045 
00046 public:
00047     WSDDDocumentExpat(map<AxisString, int>* pLibNameIdMap);
00048     ~WSDDDocumentExpat();
00049     int GetDeployment(const AxisChar* sWSDD, WSDDDeployment* pDeployment);
00050     int UpdateDeployment(const AxisChar* sWSDD, WSDDDeployment* pDeployment);
00051 
00052     void startElement(const XML_Ch *qname,const XML_Ch **attrs);
00053     void endElement(const XML_Ch *qname);
00054     void characters(const XML_Ch *chars,int length);
00055     void startPrefixMapping(const XML_Ch *prefix, const XML_Ch *uri);
00056     void endPrefixMapping(const XML_Ch *prefix);
00057 
00058     inline static void XMLCALL s_startElement(void* p, const XML_Ch *qname,
00059         const XML_Ch **attrs)
00060     {((WSDDDocumentExpat*)p)->startElement(qname,attrs);};
00061     inline static void XMLCALL s_endElement(void* p, const XML_Ch *qname)
00062     {((WSDDDocumentExpat*)p)->endElement(qname);};
00063     inline static void XMLCALL s_characters(void* p, const XML_Ch *chars,
00064         int length)
00065     {((WSDDDocumentExpat*)p)->characters(chars,length);};
00066     inline static void XMLCALL s_startPrefixMapping(void* p, 
00067         const XML_Ch *prefix, const XML_Ch *uri)
00068     {((WSDDDocumentExpat*)p)->startPrefixMapping(prefix, uri);};
00069     inline static void XMLCALL s_endPrefixMapping(void* p, 
00070         const XML_Ch *prefix)
00071     {((WSDDDocumentExpat*)p)->endPrefixMapping(prefix);};
00072 };
00073 
00074 #endif
00075  

Generated on Fri Apr 9 12:21:29 2004 for axiscpp by doxygen1.2.18