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: XSNamespaceItem.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#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
XSNamespaceItem::fSchemaNamespace
const XMLCh * fSchemaNamespace
Definition: XSNamespaceItem.hpp:223
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAttributeGroupDefinition
Definition: XSAttributeGroupDefinition.hpp:42
XSNamespaceItem
Definition: XSNamespaceItem.hpp:53
XSElementDeclaration
Definition: XSElementDeclaration.hpp:44
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
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSModel
Definition: XSModel.hpp:59
XSNamespaceItem::fXSModel
XSModel * fXSModel
Definition: XSNamespaceItem.hpp:201
XSAnnotation
Definition: XSAnnotation.hpp:41
XSNamedMap.hpp
PlatformUtils.hpp
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XSNotationDeclaration
Definition: XSNotationDeclaration.hpp:40
XSNamespaceItem::fGrammar
SchemaGrammar * fGrammar
Definition: XSNamespaceItem.hpp:200
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSNamespaceItem::fMemoryManager
MemoryManager *const fMemoryManager
Definition: XSNamespaceItem.hpp:199
StringList
RefArrayVectorOf< XMLCh > StringList
Definition: XSConstants.hpp:54
XSNamespaceItem::fXSAnnotationList
XSAnnotationList * fXSAnnotationList
Definition: XSNamespaceItem.hpp:221
XSNamespaceItem::getAnnotations
XSAnnotationList * getAnnotations()
[annotations]: a set of annotations.
Definition: XSNamespaceItem.hpp:226
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSObject.hpp
XSConstants::COMPONENT_TYPE
COMPONENT_TYPE
Definition: XSConstants.hpp:61
XSNamedMap< XSObject >
XSAnnotationList
RefVectorOf< XSAnnotation > XSAnnotationList
Definition: XSConstants.hpp:41
XSConstants::MULTIVALUE_FACET
The object describes enumeration/pattern facets.
Definition: XSConstants.hpp:118
XSModelGroupDefinition
Definition: XSModelGroupDefinition.hpp:42
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:42
XSTypeDefinition
This class represents a complexType or simpleType definition.
Definition: XSTypeDefinition.hpp:39