types.h

00001 /*
00002 
00003 types.h
00004 
00005 WSDL parser and converter to gSOAP header file format
00006 
00007 --------------------------------------------------------------------------------
00008 gSOAP XML Web services tools
00009 Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
00010 
00011 This program is free software; you can redistribute it and/or modify it under
00012 the terms of the GNU General Public License as published by the Free Software
00013 Foundation; either version 2 of the License, or (at your option) any later
00014 version.
00015 
00016 This program is distributed in the hope that it will be useful, but WITHOUT ANY
00017 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00018 PARTICULAR PURPOSE. See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License along with
00021 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00022 Place, Suite 330, Boston, MA 02111-1307 USA
00023 
00024 Author contact information:
00025 engelen@genivia.com / engelen@acm.org
00026 --------------------------------------------------------------------------------
00027 
00028 */
00029 
00030 #ifndef TYPES_H
00031 #define TYPES_H
00032 
00033 #include "includes.h"
00034 #include "wsdlH.h"
00035 
00036 enum Type { NONE, CLASS, ENUM, STRUCT, TYPEDEF };
00037 
00038 enum Lookup { NOLOOKUP, LOOKUP };
00039 
00040 class Types
00041 { public:
00042     SetOfString         knames; // keywords, reserved words, class names, and typedefs
00043     MapOfStringToString deftypemap;
00044     MapOfStringToString usetypemap;
00045     MapOfStringToString ptrtypemap;
00046     MapOfPairToString   qnames; // (URI,name) -> name
00047     MapOfStringToString uris;   // URI -> prefix
00048     MapOfStringToNum    syms;   // prefix -> count (ns1, ns2, ...)
00049     SetOfString         rnames; // enum reserved symbolic names to avoid reuse
00050     SetOfString         onames; // service operator names
00051     MapOfPairToString   snames; // enum symbolic names
00052     Types();
00053     void init();
00054     int read(const char *file);
00055   private:
00056     const char *fname(const char *prefix, const char *URI, const char *qname, SetOfString *reserved, enum Lookup lookup);
00057   public:
00058     const char *aname(const char *prefix, const char *URI, const char *qname);
00059     const char *cname(const char *prefix, const char *URI, const char *qname);
00060     const char *tname(const char *prefix, const char *URI, const char *qname);
00061     const char *oname(const char *prefix, const char *URI, const char *qname);
00062     const char *pname(bool flag, const char *prefix, const char *URI, const char *qname);
00063     const char *sname(const char *type, const char *value);
00064     const char *nsprefix(const char *prefix, const char *URI);
00065     const char *deftname(enum Type type, const char *pointer, const char *prefix, const char *URI, const char *qname);
00066     int is_defined(const char *prefix, const char *URI, const char *qname);
00067     void define(const char *URI, const char *name, const xs__complexType&);
00068     void gen(const char *URI, const vector<xs__attribute>&);
00069     void gen(const char *URI, const vector<xs__attributeGroup>&);
00070     void gen(const char *URI, const vector<xs__all>&);
00071     void gen(const char *URI, const vector<xs__sequence>&);
00072     void gen(const char *URI, const vector<xs__sequence*>&);
00073     void gen(const char *URI, const vector<xs__element>&);
00074     void gen(const char *URI, const vector<xs__group>&);
00075     void gen(const char *URI, const vector<xs__choice>&);
00076     void gen(const char *URI, const vector<xs__any>&);
00077     void gen(const char *URI, const char *name, const xs__simpleType&);
00078     void gen(const char *URI, const char *name, const xs__complexType&);
00079     void gen(const char *URI, const xs__attribute&);
00080     void gen(const char *URI, const xs__all&);
00081     void gen(const char *URI, const xs__sequence&);
00082     void gen(const char *URI, const xs__element&);
00083     void gen(const char *URI, const xs__group&);
00084     void gen(const char *URI, const xs__choice&);
00085     void gen(const char *URI, const xs__any&);
00086     void gen(const char *URI, const xs__anyAttribute&);
00087 };
00088 
00089 #endif

Generated on Mon Jun 5 10:20:42 2006 for Intelligence.kdevelop by  doxygen 1.4.6