XSNamespaceItem.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSNAMESPACEITEM_HPP)
#define XERCESC_INCLUDE_GUARD_XSNAMESPACEITEM_HPP
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/psvi/XSObject.hpp>
#include <xercesc/framework/psvi/XSNamedMap.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// forward declarations
class XSAnnotation;
class XSAttributeDeclaration;
class XSAttributeGroupDefinition;
class XSElementDeclaration;
class XSModelGroupDefinition;
class XSNotationDeclaration;
class XSTypeDefinition;
class SchemaGrammar;
class XSModel;
class XMLPARSER_EXPORT XSNamespaceItem : public XMemory
{
public:
// Constructors and Destructor
// -----------------------------------------------------------------------
XSNamespaceItem
(
XSModel* const xsModel
, SchemaGrammar* const grammar
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
XSNamespaceItem
(
XSModel* const xsModel
, const XMLCh* const schemaNamespace
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~XSNamespaceItem();
//---------------------
const XMLCh *getSchemaNamespace() const;
XSNamedMap<XSObject> *getComponents(XSConstants::COMPONENT_TYPE objectType);
XSAnnotationList *getAnnotations();
const XSAnnotationList *getAnnotations() const;
XSElementDeclaration *getElementDeclaration(const XMLCh *name);
XSAttributeDeclaration *getAttributeDeclaration(const XMLCh *name);
XSTypeDefinition *getTypeDefinition(const XMLCh *name);
XSAttributeGroupDefinition *getAttributeGroup(const XMLCh *name);
XSModelGroupDefinition *getModelGroupDefinition(const XMLCh *name);
XSNotationDeclaration *getNotationDeclaration(const XMLCh *name);
const StringList *getDocumentLocations();
//----------------------------------
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSNamespaceItem(const XSNamespaceItem&);
XSNamespaceItem & operator=(const XSNamespaceItem &);
protected:
friend class XSModel;
friend class XSObjectFactory;
// -----------------------------------------------------------------------
// data members
// -----------------------------------------------------------------------
// fMemoryManager:
// used for any memory allocations
MemoryManager* const fMemoryManager;
SchemaGrammar* fGrammar;
XSModel* fXSModel;
/* Need a XSNamedMap for each component top-level?
that is top level.
ATTRIBUTE_DECLARATION = 1,
ELEMENT_DECLARATION = 2,
TYPE_DEFINITION = 3,
ATTRIBUTE_USE = 4, no
ATTRIBUTE_GROUP_DEFINITION= 5,
MODEL_GROUP_DEFINITION = 6,
MODEL_GROUP = 7, no
PARTICLE = 8, no
WILDCARD = 9, no
IDENTITY_CONSTRAINT = 10, no
NOTATION_DECLARATION = 11,
ANNOTATION = 12, no
FACET = 13, no
MULTIVALUE_FACET = 14 no
*/
XSNamedMap<XSObject>* fComponentMap[XSConstants::MULTIVALUE_FACET];
XSAnnotationList* fXSAnnotationList;
RefHashTableOf<XSObject>* fHashMap[XSConstants::MULTIVALUE_FACET];
const XMLCh* fSchemaNamespace;
};
inline XSAnnotationList* XSNamespaceItem::getAnnotations()
{
return fXSAnnotationList;
}
inline const XSAnnotationList* XSNamespaceItem::getAnnotations() const
{
return fXSAnnotationList;
}
inline const XMLCh *XSNamespaceItem::getSchemaNamespace() const
{
return fSchemaNamespace;
}
XERCES_CPP_NAMESPACE_END
#endif
PlatformUtils.hpp
XSAnnotationList
RefVectorOf< XSAnnotation > XSAnnotationList
Definition XSConstants.hpp:47
StringList
RefArrayVectorOf< XMLCh > StringList
Definition XSConstants.hpp:54
XSNamedMap.hpp
XSObject.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41
XSAnnotation
Definition XSAnnotation.hpp:42
XSAttributeDeclaration
Definition XSAttributeDeclaration.hpp:43
XSAttributeGroupDefinition
Definition XSAttributeGroupDefinition.hpp:43
XSConstants::COMPONENT_TYPE
COMPONENT_TYPE
Definition XSConstants.hpp:61
XSConstants::MULTIVALUE_FACET
@ MULTIVALUE_FACET
The object describes enumeration/pattern facets.
Definition XSConstants.hpp:118
XSElementDeclaration
Definition XSElementDeclaration.hpp:45
XSModelGroupDefinition
Definition XSModelGroupDefinition.hpp:43
XSModel
Definition XSModel.hpp:60
XSNamedMap
Definition XSNamedMap.hpp:41
XSNamespaceItem
Definition XSNamespaceItem.hpp:54
XSNamespaceItem::getAttributeDeclaration
XSAttributeDeclaration * getAttributeDeclaration(const XMLCh *name)
Convenience method.
XSNamespaceItem::getNotationDeclaration
XSNotationDeclaration * getNotationDeclaration(const XMLCh *name)
Convenience method.
XSNamespaceItem::getModelGroupDefinition
XSModelGroupDefinition * getModelGroupDefinition(const XMLCh *name)
Convenience method.
XSNamespaceItem::~XSNamespaceItem
~XSNamespaceItem()
XSNamespaceItem::XSNamespaceItem
XSNamespaceItem(XSModel *const xsModel, const XMLCh *const schemaNamespace, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
XSNamespaceItem::getComponents
XSNamedMap< XSObject > * getComponents(XSConstants::COMPONENT_TYPE objectType)
[schema components]: a list of top-level components, i.e.
XSNamespaceItem::fSchemaNamespace
const XMLCh * fSchemaNamespace
Definition XSNamespaceItem.hpp:223
XSNamespaceItem::fMemoryManager
MemoryManager *const fMemoryManager
Definition XSNamespaceItem.hpp:199
XSNamespaceItem::fGrammar
SchemaGrammar * fGrammar
Definition XSNamespaceItem.hpp:200
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
XSNamespaceItem::getAnnotations
XSAnnotationList * getAnnotations()
[annotations]: a set of annotations.
Definition XSNamespaceItem.hpp:226
XSNamespaceItem::fXSModel
XSModel * fXSModel
Definition XSNamespaceItem.hpp:201
XSNamespaceItem::getTypeDefinition
XSTypeDefinition * getTypeDefinition(const XMLCh *name)
Convenience method.
XSNamespaceItem::getElementDeclaration
XSElementDeclaration * getElementDeclaration(const XMLCh *name)
Convenience method.
XSNamespaceItem::getDocumentLocations
const StringList * getDocumentLocations()
[document location] - a list of locations URI for the documents that contributed to the XSModel.
XSNamespaceItem::getAttributeGroup
XSAttributeGroupDefinition * getAttributeGroup(const XMLCh *name)
Convenience method.
XSNamespaceItem::fXSAnnotationList
XSAnnotationList * fXSAnnotationList
Definition XSNamespaceItem.hpp:221
XSNamespaceItem::XSNamespaceItem
XSNamespaceItem(XSModel *const xsModel, SchemaGrammar *const grammar, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSNotationDeclaration
Definition XSNotationDeclaration.hpp:41
XSTypeDefinition
This class represents a complexType or simpleType definition.
Definition XSTypeDefinition.hpp:40