Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ZORBA_TYPES_TYPEIDENT_H
00017 #define ZORBA_TYPES_TYPEIDENT_H
00018
00019 #include <zorba/config.h>
00020 #include <zorba/api_shared_types.h>
00021 #include <zorba/identtypes.h>
00022 #include <zorba/zorba_string.h>
00023
00024 namespace zorba {
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class ZORBA_DLL_PUBLIC TypeIdentifier : public SmartObject {
00035 public:
00036
00037
00038 ~TypeIdentifier();
00039
00040 static
00041 TypeIdentifier_t
00042 createNamedType(
00043 const String& uri,
00044 const String& localName,
00045 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00046 );
00047
00048 static
00049 TypeIdentifier_t
00050 createElementType(
00051 const String& uri,
00052 bool uriWildcard,
00053 const String& localName,
00054 bool localNameWildcard,
00055 TypeIdentifier_t contentType,
00056 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00057 );
00058
00059 static
00060 TypeIdentifier_t
00061 createAttributeType(
00062 const String& uri,
00063 bool uriWildcard,
00064 const String& localNameName,
00065 bool localNameWildcard,
00066 TypeIdentifier_t contentType,
00067 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00068 );
00069
00070 static
00071 TypeIdentifier_t
00072 createDocumentType(
00073 TypeIdentifier_t contentType,
00074 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00075 );
00076
00077 static
00078 TypeIdentifier_t
00079 createPIType(
00080 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00081 );
00082
00083 static
00084 TypeIdentifier_t
00085 createTextType(
00086 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00087 );
00088
00089 static
00090 TypeIdentifier_t
00091 createCommentType(
00092 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00093 );
00094
00095 static
00096 TypeIdentifier_t
00097 createAnyNodeType(
00098 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00099 );
00100
00101 static
00102 TypeIdentifier_t
00103 createItemType(
00104 IdentTypes::quantifier_t quantifier = IdentTypes::QUANT_ONE
00105 );
00106
00107 static
00108 TypeIdentifier_t
00109 createEmptyType();
00110
00111 IdentTypes::kind_t
00112 getKind() const;
00113
00114 IdentTypes::quantifier_t
00115 getQuantifier() const;
00116
00117 const String&
00118 getUri() const;
00119
00120 bool
00121 isUriWildcard() const;
00122
00123 const String&
00124 getLocalName() const;
00125
00126 bool
00127 isLocalNameWildcard() const;
00128
00129 TypeIdentifier_t
00130 getContentType() const;
00131
00132 private:
00133 TypeIdentifier();
00134
00135 IdentTypes::kind_t m_kind;
00136 IdentTypes::quantifier_t m_quantifier;
00137 String m_uri;
00138 bool m_uriWildcard;
00139 String m_localName;
00140 bool m_localNameWildcard;
00141 TypeIdentifier_t m_contentType;
00142 };
00143
00144 #ifdef WIN32
00145 template class ZORBA_DLL_PUBLIC zorba::SmartPtr<TypeIdentifier>;
00146 #endif
00147
00148
00149 }
00150
00151 #endif
00152