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