Xerces-C++: XSNamespaceItem.hpp Source File

| API Docs for SAX and DOM |
| Main Page Classes Files Related Pages # XSNamespaceItem.hpp Go to the documentation of this file.
    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: XSNamespaceItem.hpp 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022 #if !defined(XSNAMESPACEITEM_HPP)
    00023 #define XSNAMESPACEITEM_HPP
    00024
    00025 #include <xercesc/util/PlatformUtils.hpp>
    00026 #include <xercesc/framework/psvi/XSObject.hpp>
    00027 #include <xercesc/framework/psvi/XSNamedMap.hpp>
    00028
    00029 XERCES_CPP_NAMESPACE_BEGIN
    00030
    00042 // forward declarations
    00043 class XSAnnotation;
    00044 class XSAttributeDeclaration;
    00045 class XSAttributeGroupDefinition;
    00046 class XSElementDeclaration;
    00047 class XSModelGroupDefinition;
    00048 class XSNotationDeclaration;
    00049 class XSTypeDefinition;
    00050 class SchemaGrammar;
    00051 class XSModel;
    00052
    00053 class  XSNamespaceItem : public XMemory
    00054 {
    00055 public:
    00056
    00057     //  Constructors and Destructor
    00058     // -----------------------------------------------------------------------
    00061
    00069     XSNamespaceItem
    00070     (
    00071         XSModel* const         xsModel
    00072         , SchemaGrammar* const grammar
    00073         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00074     );
    00075
    00076     XSNamespaceItem
    00077     (
    00078         XSModel* const         xsModel
    00079         , const XMLCh* const   schemaNamespace
    00080         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00081     );
    00082
    00084
    00087     ~XSNamespaceItem();
    00089
    00090     //---------------------
    00094
    00099     const XMLCh *getSchemaNamespace();
    00100
    00111     XSNamedMap<XSObject> *getComponents(XSConstants::COMPONENT_TYPE objectType);
    00112
    00116     XSAnnotationList *getAnnotations();
    00117
    00124     XSElementDeclaration *getElementDeclaration(const XMLCh *name);
    00125
    00132     XSAttributeDeclaration *getAttributeDeclaration(const XMLCh *name);
    00133
    00141     XSTypeDefinition *getTypeDefinition(const XMLCh *name);
    00142
    00149     XSAttributeGroupDefinition *getAttributeGroup(const XMLCh *name);
    00150
    00157     XSModelGroupDefinition *getModelGroupDefinition(const XMLCh *name);
    00158
    00165     XSNotationDeclaration *getNotationDeclaration(const XMLCh *name);
    00166
    00171     StringList *getDocumentLocations();
    00172
    00174
    00175     //----------------------------------
    00179
    00180
    00182 private:
    00183
    00184     // -----------------------------------------------------------------------
    00185     //  Unimplemented constructors and operators
    00186     // -----------------------------------------------------------------------
    00187     XSNamespaceItem(const XSNamespaceItem&);
    00188     XSNamespaceItem & operator=(const XSNamespaceItem &);
    00189
    00190 protected:
    00191     friend class XSModel;
    00192     friend class XSObjectFactory;
    00193     // -----------------------------------------------------------------------
    00194     //  data members
    00195     // -----------------------------------------------------------------------
    00196     // fMemoryManager:
    00197     //  used for any memory allocations
    00198     MemoryManager* const    fMemoryManager;
    00199     SchemaGrammar*          fGrammar;
    00200     XSModel*                fXSModel;
    00201
    00202     /* Need a XSNamedMap for each component    top-level?
    00203        that is top level.
    00204           ATTRIBUTE_DECLARATION     = 1,
    00205           ELEMENT_DECLARATION       = 2,
    00206           TYPE_DEFINITION           = 3,
    00207           ATTRIBUTE_USE             = 4,       no
    00208           ATTRIBUTE_GROUP_DEFINITION= 5,
    00209           MODEL_GROUP_DEFINITION    = 6,
    00210           MODEL_GROUP               = 7,       no
    00211           PARTICLE                  = 8,       no
    00212           WILDCARD                  = 9,       no
    00213           IDENTITY_CONSTRAINT       = 10,      no
    00214           NOTATION_DECLARATION      = 11,
    00215           ANNOTATION                = 12,      no
    00216           FACET                     = 13,      no
    00217           MULTIVALUE_FACET          = 14       no
    00218     */
    00219     XSNamedMap<XSObject>*                   fComponentMap[XSConstants::MULTIVALUE_FACET];
    00220     XSAnnotationList*                       fXSAnnotationList;
    00221     RefHashTableOf<XSObject>*               fHashMap[XSConstants::MULTIVALUE_FACET];
    00222     const XMLCh*                            fSchemaNamespace;
    00223 };
    00224
    00225 inline XSAnnotationList* XSNamespaceItem::getAnnotations()
    00226 {
    00227     return fXSAnnotationList;
    00228 }
    00229
    00230 inline const XMLCh *XSNamespaceItem::getSchemaNamespace()
    00231 {
    00232     return fSchemaNamespace;
    00233 }
    00234
    00235
    00236
    00237 XERCES_CPP_NAMESPACE_END
    00238
    00239 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.