comparison GEMBASSY-1.0.3/gsoap/wsdl/types.h @ 0:8300eb051bea draft

Initial upload
author ktnyt
date Fri, 26 Jun 2015 05:19:29 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8300eb051bea
1 /*
2 types.h
3
4 WSDL parser and converter to gSOAP header file format
5
6 --------------------------------------------------------------------------------
7 gSOAP XML Web services tools
8 Copyright (C) 2000-2012, Robert van Engelen, Genivia Inc. All Rights Reserved.
9 This software is released under one of the following licenses:
10 GPL or Genivia's license for commercial use.
11 --------------------------------------------------------------------------------
12 GPL license.
13
14 This program is free software; you can redistribute it and/or modify it under
15 the terms of the GNU General Public License as published by the Free Software
16 Foundation; either version 2 of the License, or (at your option) any later
17 version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT ANY
20 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 PARTICULAR PURPOSE. See the GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
25 Place, Suite 330, Boston, MA 02111-1307 USA
26
27 Author contact information:
28 engelen@genivia.com / engelen@acm.org
29 --------------------------------------------------------------------------------
30 A commercial use license is available from Genivia, Inc., contact@genivia.com
31 --------------------------------------------------------------------------------
32
33 */
34
35 #ifndef TYPES_H
36 #define TYPES_H
37
38 #include "includes.h"
39 #include "wsdlH.h"
40
41 enum Type { NONE, CLASS, ENUM, STRUCT, TYPEDEF };
42
43 enum Lookup { NOLOOKUP, LOOKUP };
44
45 class Types
46 { public:
47 SetOfString knames; // keywords, reserved words, class names, and typedefs
48 MapOfStringToString modtypemap;
49 MapOfStringToString deftypemap;
50 MapOfStringToString usetypemap;
51 MapOfStringToString ptrtypemap;
52 MapOfStringToString eqvtypemap;
53 MapOfPairToString qnames; // (URI,name) -> name
54 MapOfStringToString uris; // URI -> prefix
55 MapOfStringToNum syms; // prefix -> count (ns1, ns2, ...)
56 SetOfString rnames; // reserved symbolic names to avoid clashes
57 SetOfString onames; // service operator names
58 MapOfPairToString enames; // enum symbolic names
59 VectorOfString scope; // de-anonymizer stack
60 int snum; // struct name index, TODO: consider map of URI to count per URI
61 int unum; // union name index, TODO: consider map of URI to count per URI
62 int gnum; // enum name index, TODO: consider map of URI to count per URI
63 bool with_union;
64 bool fake_union;
65 Types();
66 void init();
67 int read(const char *file);
68 private:
69 const char *fname(const char *prefix, const char *URI, const char *qname, SetOfString *reserved, enum Lookup lookup, bool isqname);
70 public:
71 const char *aname(const char *prefix, const char *URI, const char *qname);
72 const char *cname(const char *prefix, const char *URI, const char *qname);
73 const char *tname(const char *prefix, const char *URI, const char *qname);
74 const char *tnameptr(bool, const char *prefix, const char *URI, const char *qname);
75 const char *pname(bool flag, const char *prefix, const char *URI, const char *qname);
76 const char *oname(const char *prefix, const char *URI, const char *qname);
77 const char *ename(const char *type, const char *value, bool isqname);
78 const char *sname(const char *URI, const char *name);
79 const char *gname(const char *URI, const char *name);
80 const char *uname(const char *URI);
81 const char *nsprefix(const char *prefix, const char *URI);
82 const char *prefix(const char *name);
83 const char *uri(const char *name);
84 const char *deftname(enum Type type, const char *pointer, bool is_pointer, const char *prefix, const char *URI, const char *qname);
85 bool is_defined(const char *prefix, const char *URI, const char *qname);
86 bool is_nillable(const xs__element& element);
87 bool is_basetypeforunion(const char *prefix, const char *URI, const char *type);
88 bool is_basetype(const char *prefix, const char *URI, const char *type);
89 void dump(FILE*);
90 void define(const char *URI, const char *name, const xs__complexType&);
91 void gen(const char *URI, const vector<xs__attribute>&);
92 void gen(const char *URI, const vector<xs__attributeGroup>&);
93 void gen(const char *URI, const vector<xs__all>&);
94 void gen(const char *URI, const vector<xs__element>&, const char *minOccurs, const char *maxOccurs);
95 void gen(const char *URI, const vector<xs__group>&);
96 void gen(const char *URI, const vector<xs__any>&);
97 void gen(const char *URI, const vector<xs__contents>&);
98 void gen(const char *URI, const char *name, const xs__simpleType&, bool anonymous);
99 void gen(const char *URI, const char *name, const xs__complexType&, bool anonymous);
100 void gen(const char *URI, const xs__attribute&);
101 void gen(const char *URI, const xs__all&, const char *minOccurs, const char *maxOccurs);
102 void gen(const char *URI, const xs__seqchoice&, const char *minOccurs, const char *maxOccurs);
103 void gen(const char *URI, const char *name, const xs__seqchoice&, const char *minOccurs, const char *maxOccurs);
104 void gen(const char *URI, const xs__element&, bool substok, const char *minOccurs, const char *maxOccurs);
105 void gen(const char *URI, const xs__group&, const char *minOccurs, const char *maxOccurs);
106 void gen(const char *URI, const xs__any&, const char *minOccurs, const char *maxOccurs);
107 void gen(const char *URI, const xs__anyAttribute&);
108 void gen_inh(const char *URI, const xs__complexType *complexType, bool anonymous);
109 void gen_soap_array(const char *name, const char *t, const char *item, const char *type);
110 void gen_substitutions(const char *URI, const xs__element &element);
111 void document(const xs__annotation*);
112 void modify(const char *name);
113 const char *format(const char *text);
114 };
115
116 #endif