00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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;
00043 MapOfStringToString deftypemap;
00044 MapOfStringToString usetypemap;
00045 MapOfStringToString ptrtypemap;
00046 MapOfPairToString qnames;
00047 MapOfStringToString uris;
00048 MapOfStringToNum syms;
00049 SetOfString rnames;
00050 SetOfString onames;
00051 MapOfPairToString snames;
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