Xerces-C++  3.2.3
XSNamespaceItem.hpp
Go to the documentation of this file.
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$
20  */
21 
22 #if !defined(XERCESC_INCLUDE_GUARD_XSNAMESPACEITEM_HPP)
23 #define XERCESC_INCLUDE_GUARD_XSNAMESPACEITEM_HPP
24 
28 
30 
42 // forward declarations
43 class XSAnnotation;
49 class XSTypeDefinition;
50 class SchemaGrammar;
51 class XSModel;
52 
54 {
55 public:
56 
57  // Constructors and Destructor
58  // -----------------------------------------------------------------------
61 
70  (
71  XSModel* const xsModel
72  , SchemaGrammar* const grammar
74  );
75 
77  (
78  XSModel* const xsModel
79  , const XMLCh* const schemaNamespace
81  );
82 
84 
89 
90  //---------------------
94 
99  const XMLCh *getSchemaNamespace() const;
100 
112 
116  XSAnnotationList *getAnnotations();
117  const XSAnnotationList *getAnnotations() const;
118 
126 
134 
143 
151 
159 
167 
173 
175 
176  //----------------------------------
180 
181 
183 private:
184 
185  // -----------------------------------------------------------------------
186  // Unimplemented constructors and operators
187  // -----------------------------------------------------------------------
189  XSNamespaceItem & operator=(const XSNamespaceItem &);
190 
191 protected:
192  friend class XSModel;
193  friend class XSObjectFactory;
194  // -----------------------------------------------------------------------
195  // data members
196  // -----------------------------------------------------------------------
197  // fMemoryManager:
198  // used for any memory allocations
200  SchemaGrammar* fGrammar;
202 
203  /* Need a XSNamedMap for each component top-level?
204  that is top level.
205  ATTRIBUTE_DECLARATION = 1,
206  ELEMENT_DECLARATION = 2,
207  TYPE_DEFINITION = 3,
208  ATTRIBUTE_USE = 4, no
209  ATTRIBUTE_GROUP_DEFINITION= 5,
210  MODEL_GROUP_DEFINITION = 6,
211  MODEL_GROUP = 7, no
212  PARTICLE = 8, no
213  WILDCARD = 9, no
214  IDENTITY_CONSTRAINT = 10, no
215  NOTATION_DECLARATION = 11,
216  ANNOTATION = 12, no
217  FACET = 13, no
218  MULTIVALUE_FACET = 14 no
219  */
222  RefHashTableOf<XSObject>* fHashMap[XSConstants::MULTIVALUE_FACET];
224 };
225 
227 {
228  return fXSAnnotationList;
229 }
230 
232 {
233  return fXSAnnotationList;
234 }
235 
237 {
238  return fSchemaNamespace;
239 }
240 
241 
242 
244 
245 #endif
XSNamedMap.hpp
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:41
XSNamespaceItem::getTypeDefinition
XSTypeDefinition * getTypeDefinition(const XMLCh *name)
Convenience method.
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSModelGroupDefinition
Definition: XSModelGroupDefinition.hpp:43
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:43
XSNamespaceItem::getAttributeGroup
XSAttributeGroupDefinition * getAttributeGroup(const XMLCh *name)
Convenience method.
XSNamespaceItem
Definition: XSNamespaceItem.hpp:54
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSNamespaceItem::getElementDeclaration
XSElementDeclaration * getElementDeclaration(const XMLCh *name)
Convenience method.
XSNamespaceItem::~XSNamespaceItem
~XSNamespaceItem()
XSNamespaceItem::getSchemaNamespace
const XMLCh * getSchemaNamespace() const
[schema namespace]: A namespace name or null corresponding to the target namespace of the schema docu...
Definition: XSNamespaceItem.hpp:236
XSModel
Definition: XSModel.hpp:60
PlatformUtils.hpp
XSObject.hpp
XSNamespaceItem::fSchemaNamespace
const XMLCh * fSchemaNamespace
Definition: XSNamespaceItem.hpp:223
XSNamespaceItem::getComponents
XSNamedMap< XSObject > * getComponents(XSConstants::COMPONENT_TYPE objectType)
[schema components]: a list of top-level components, i.e.
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAnnotation
Definition: XSAnnotation.hpp:42
XSTypeDefinition
This class represents a complexType or simpleType definition.
Definition: XSTypeDefinition.hpp:40
XSNotationDeclaration
Definition: XSNotationDeclaration.hpp:41
XSNamespaceItem::fGrammar
SchemaGrammar * fGrammar
Definition: XSNamespaceItem.hpp:200
XSNamespaceItem::XSNamespaceItem
XSNamespaceItem(XSModel *const xsModel, const XMLCh *const schemaNamespace, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
StringList
RefArrayVectorOf< XMLCh > StringList
Definition: XSConstants.hpp:54
XSNamespaceItem::getAttributeDeclaration
XSAttributeDeclaration * getAttributeDeclaration(const XMLCh *name)
Convenience method.
XSAttributeGroupDefinition
Definition: XSAttributeGroupDefinition.hpp:43
XSConstants::COMPONENT_TYPE
COMPONENT_TYPE
Definition: XSConstants.hpp:61
XSAnnotationList
RefVectorOf< XSAnnotation > XSAnnotationList
Definition: XSConstants.hpp:41
XSElementDeclaration
Definition: XSElementDeclaration.hpp:45
XSNamespaceItem::getAnnotations
XSAnnotationList * getAnnotations()
[annotations]: a set of annotations.
Definition: XSNamespaceItem.hpp:226
XSNamespaceItem::getDocumentLocations
const StringList * getDocumentLocations()
[document location] - a list of locations URI for the documents that contributed to the XSModel.
XSNamespaceItem::fXSAnnotationList
XSAnnotationList * fXSAnnotationList
Definition: XSNamespaceItem.hpp:221
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:40
XSNamespaceItem::getNotationDeclaration
XSNotationDeclaration * getNotationDeclaration(const XMLCh *name)
Convenience method.
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSNamedMap< XSObject >
XSNamespaceItem::fXSModel
XSModel * fXSModel
Definition: XSNamespaceItem.hpp:201
XSNamespaceItem::getModelGroupDefinition
XSModelGroupDefinition * getModelGroupDefinition(const XMLCh *name)
Convenience method.
XSConstants::MULTIVALUE_FACET
@ MULTIVALUE_FACET
The object describes enumeration/pattern facets.
Definition: XSConstants.hpp:118
XSNamespaceItem::fMemoryManager
MemoryManager *const fMemoryManager
Definition: XSNamespaceItem.hpp:199
XSNamespaceItem::XSNamespaceItem
XSNamespaceItem(XSModel *const xsModel, SchemaGrammar *const grammar, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.