[2674] | 1 | /* |
---|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
---|
| 4 | * this work for additional information regarding copyright ownership. |
---|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 6 | * (the "License"); you may not use this file except in compliance with |
---|
| 7 | * the License. You may obtain a copy of the License at |
---|
| 8 | * |
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 10 | * |
---|
| 11 | * Unless required by applicable law or agreed to in writing, software |
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 14 | * See the License for the specific language governing permissions and |
---|
| 15 | * limitations under the License. |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | /* |
---|
| 19 | * $Id: XMLSchemaDescription.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #if !defined(XMLSCHEMADESCRIPTION_HPP) |
---|
| 24 | #define XMLSCHEMADESCRIPTION_HPP |
---|
| 25 | |
---|
| 26 | #include <xercesc/framework/XMLGrammarDescription.hpp> |
---|
| 27 | #include <xercesc/util/RefArrayVectorOf.hpp> |
---|
| 28 | |
---|
| 29 | XERCES_CPP_NAMESPACE_BEGIN |
---|
| 30 | |
---|
| 31 | typedef const XMLCh* const LocationHint; |
---|
| 32 | |
---|
| 33 | class XMLPARSER_EXPORT XMLSchemaDescription : public XMLGrammarDescription |
---|
| 34 | { |
---|
| 35 | public : |
---|
| 36 | // ----------------------------------------------------------------------- |
---|
| 37 | /** @name Virtual destructor for derived classes */ |
---|
| 38 | // ----------------------------------------------------------------------- |
---|
| 39 | //@{ |
---|
| 40 | /** |
---|
| 41 | * virtual destructor |
---|
| 42 | * |
---|
| 43 | */ |
---|
| 44 | virtual ~XMLSchemaDescription(); |
---|
| 45 | //@} |
---|
| 46 | |
---|
| 47 | // ----------------------------------------------------------------------- |
---|
| 48 | /** @name Implementation of Grammar Description Interface */ |
---|
| 49 | // ----------------------------------------------------------------------- |
---|
| 50 | //@{ |
---|
| 51 | /** |
---|
| 52 | * getGrammarType |
---|
| 53 | * |
---|
| 54 | */ |
---|
| 55 | virtual Grammar::GrammarType getGrammarType() const |
---|
| 56 | { |
---|
| 57 | return Grammar::SchemaGrammarType; |
---|
| 58 | } |
---|
| 59 | //@} |
---|
| 60 | |
---|
| 61 | // ----------------------------------------------------------------------- |
---|
| 62 | /** @name The SchemaDescription Interface */ |
---|
| 63 | // ----------------------------------------------------------------------- |
---|
| 64 | //@{ |
---|
| 65 | |
---|
| 66 | enum ContextType |
---|
| 67 | { |
---|
| 68 | CONTEXT_INCLUDE, |
---|
| 69 | CONTEXT_REDEFINE, |
---|
| 70 | CONTEXT_IMPORT, |
---|
| 71 | CONTEXT_PREPARSE, |
---|
| 72 | CONTEXT_INSTANCE, |
---|
| 73 | CONTEXT_ELEMENT, |
---|
| 74 | CONTEXT_ATTRIBUTE, |
---|
| 75 | CONTEXT_XSITYPE, |
---|
| 76 | CONTEXT_UNKNOWN |
---|
| 77 | }; |
---|
| 78 | |
---|
| 79 | /** |
---|
| 80 | * getContextType |
---|
| 81 | * |
---|
| 82 | */ |
---|
| 83 | virtual ContextType getContextType() const = 0; |
---|
| 84 | |
---|
| 85 | /** |
---|
| 86 | * getTargetNamespace |
---|
| 87 | * |
---|
| 88 | */ |
---|
| 89 | virtual const XMLCh* getTargetNamespace() const = 0; |
---|
| 90 | |
---|
| 91 | /** |
---|
| 92 | * getLocationHints |
---|
| 93 | * |
---|
| 94 | */ |
---|
| 95 | virtual RefArrayVectorOf<XMLCh>* getLocationHints() const = 0; |
---|
| 96 | |
---|
| 97 | /** |
---|
| 98 | * getTriggeringComponent |
---|
| 99 | * |
---|
| 100 | */ |
---|
| 101 | virtual const QName* getTriggeringComponent() const = 0; |
---|
| 102 | |
---|
| 103 | /** |
---|
| 104 | * getenclosingElementName |
---|
| 105 | * |
---|
| 106 | */ |
---|
| 107 | virtual const QName* getEnclosingElementName() const = 0; |
---|
| 108 | |
---|
| 109 | /** |
---|
| 110 | * getAttributes |
---|
| 111 | * |
---|
| 112 | */ |
---|
| 113 | virtual const XMLAttDef* getAttributes() const = 0; |
---|
| 114 | |
---|
| 115 | /** |
---|
| 116 | * setContextType |
---|
| 117 | * |
---|
| 118 | */ |
---|
| 119 | virtual void setContextType(ContextType) = 0; |
---|
| 120 | |
---|
| 121 | /** |
---|
| 122 | * setTargetNamespace |
---|
| 123 | * |
---|
| 124 | */ |
---|
| 125 | virtual void setTargetNamespace(const XMLCh* const) = 0; |
---|
| 126 | |
---|
| 127 | /** |
---|
| 128 | * setLocationHints |
---|
| 129 | * |
---|
| 130 | */ |
---|
| 131 | virtual void setLocationHints(const XMLCh* const) = 0; |
---|
| 132 | |
---|
| 133 | /** |
---|
| 134 | * setTriggeringComponent |
---|
| 135 | * |
---|
| 136 | */ |
---|
| 137 | virtual void setTriggeringComponent(QName* const) = 0; |
---|
| 138 | |
---|
| 139 | /** |
---|
| 140 | * getenclosingElementName |
---|
| 141 | * |
---|
| 142 | */ |
---|
| 143 | virtual void setEnclosingElementName(QName* const) = 0; |
---|
| 144 | |
---|
| 145 | /** |
---|
| 146 | * setAttributes |
---|
| 147 | * |
---|
| 148 | */ |
---|
| 149 | virtual void setAttributes(XMLAttDef* const) = 0; |
---|
| 150 | //@} |
---|
| 151 | |
---|
| 152 | /*** |
---|
| 153 | * Support for Serialization/De-serialization |
---|
| 154 | ***/ |
---|
| 155 | DECL_XSERIALIZABLE(XMLSchemaDescription) |
---|
| 156 | |
---|
| 157 | protected : |
---|
| 158 | // ----------------------------------------------------------------------- |
---|
| 159 | /** Hidden Constructors */ |
---|
| 160 | // ----------------------------------------------------------------------- |
---|
| 161 | //@{ |
---|
| 162 | XMLSchemaDescription(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager); |
---|
| 163 | //@} |
---|
| 164 | |
---|
| 165 | private : |
---|
| 166 | // ----------------------------------------------------------------------- |
---|
| 167 | /** name Unimplemented copy constructor and operator= */ |
---|
| 168 | // ----------------------------------------------------------------------- |
---|
| 169 | //@{ |
---|
| 170 | XMLSchemaDescription(const XMLSchemaDescription& ); |
---|
| 171 | XMLSchemaDescription& operator=(const XMLSchemaDescription& ); |
---|
| 172 | //@} |
---|
| 173 | |
---|
| 174 | }; |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | XERCES_CPP_NAMESPACE_END |
---|
| 178 | |
---|
| 179 | #endif |
---|