Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

WsdlExtension.h

Go to the documentation of this file.
00001 /* 
00002  * wsdlpull - A C++ parser  for WSDL  (Web services description language)
00003  * Copyright (C) 2005-2007 Vivek Krishna
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  *
00019  *
00020  */
00021 
00022 #ifndef _WSDLEXTENSIONH
00023 #define _WSDLEXTENSIONH
00024 
00025 #include <wsdlparser/Wsdl.h>
00026 #include <xmlpull/XmlPullParser.h>
00027 #include <schemaparser/SchemaParser.h>
00028 class WsdlParser;
00029 
00030 //This class is the generic interface that all extensibility namespaces must derive from
00031 class WsdlExtension
00032 {
00033  public:
00034   virtual std::string getNamespace()const = 0;
00035 
00036   //returns the namespace Uri of the wsdl extensibility elements that it can handle.
00037   virtual void setNamespacePrefix(std::string) = 0;
00038   virtual std::string getNamespacePrefix()const = 0;
00039 
00040   //does this extensibility handler handle the given namespace
00041   virtual bool isNamespaceHandler(const std::string &)const = 0;
00042   virtual std::string getExtensibilitySchema()const = 0;
00043   virtual void setSchemaParser(SchemaParser * spe) = 0;
00044 
00045   // parent is the Wsdl parent element type under which the extensibility element has come
00046   // the id returned must be non zero if the extensibility handler has handled the element correctly
00047   virtual int handleElement(int parent, XmlPullParser *) = 0;
00048 
00049   //attName is the extensibility attribute
00050   // the id returned must be non zero if the extensibility handler has handled the attribute correctly
00051   virtual int handleAttribute(int parent, std::string attName,
00052                               XmlPullParser *) = 0;
00053 
00054   //returns a valid extensibilty element
00055   //must return a non zero integer if the element was present in the wsdl
00056   virtual int getElementName(int id)const = 0;
00057 
00058   //returns a valid extensibility attribute
00059   //must return a non zero integer if the attribute was present in the wsdl
00060   virtual int getAttributeName(int id)const = 0;
00061 
00062   //this is the start of all ids that must be used for elems/attributes in this namespace
00063   virtual void setStartId(int) = 0;
00064   virtual int getStartId() const= 0;
00065   virtual void setWsdlParser(WsdlParser *){};
00066 
00067   //this method returns true if the Wsdl file had extensibility elements parsed by this extensibility handler
00068   virtual bool wasUsed()const = 0;
00069 };
00070 #endif                                            /*  */

Generated on Sun Oct 16 10:11:52 2005 for wsdlpull by  doxygen 1.3.9.1