http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XSWildcard.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2003,2004 The Apache Software Foundation.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * $Log: XSWildcard.hpp,v $
00019  * Revision 1.7  2004/09/08 13:56:09  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.6  2003/12/01 23:23:26  neilg
00023  * fix for bug 25118; thanks to Jeroen Witmond
00024  *
00025  * Revision 1.5  2003/11/21 17:34:04  knoaman
00026  * PSVI update
00027  *
00028  * Revision 1.4  2003/11/14 22:47:53  neilg
00029  * fix bogus log message from previous commit...
00030  *
00031  * Revision 1.3  2003/11/14 22:33:30  neilg
00032  * Second phase of schema component model implementation.  
00033  * Implement XSModel, XSNamespaceItem, and the plumbing necessary
00034  * to connect them to the other components.
00035  * Thanks to David Cargill.
00036  *
00037  * Revision 1.2  2003/11/06 15:30:04  neilg
00038  * first part of PSVI/schema component model implementation, thanks to David Cargill.  This covers setting the PSVIHandler on parser objects, as well as implementing XSNotation, XSSimpleTypeDefinition, XSIDCDefinition, and most of XSWildcard, XSComplexTypeDefinition, XSElementDeclaration, XSAttributeDeclaration and XSAttributeUse.
00039  *
00040  * Revision 1.1  2003/09/16 14:33:36  neilg
00041  * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
00042  *
00043  */
00044 
00045 #if !defined(XSWILDCARD_HPP)
00046 #define XSWILDCARD_HPP
00047 
00048 #include <xercesc/framework/psvi/XSObject.hpp>
00049 
00050 XERCES_CPP_NAMESPACE_BEGIN
00051 
00059 // forward declarations
00060 class XSAnnotation;
00061 class SchemaAttDef;
00062 class ContentSpecNode;
00063 
00064 class  XSWildcard : public XSObject
00065 {
00066 public:
00067 
00068     // Namespace Constraint
00069     enum NAMESPACE_CONSTRAINT {
00073         NSCONSTRAINT_ANY          = 1,
00077         NSCONSTRAINT_NOT          = 2,
00081         NSCONSTRAINT_DERIVATION_LIST         = 3
00082     };
00083 
00084     // Process contents
00085     enum PROCESS_CONTENTS {
00090         PC_STRICT                 = 1,
00094         PC_SKIP                   = 2,
00101         PC_LAX                    = 3
00102     };
00103 
00104     //  Constructors and Destructor
00105     // -----------------------------------------------------------------------
00108 
00117     XSWildcard
00118     (
00119         SchemaAttDef* const attWildCard
00120         , XSAnnotation* const annot
00121         , XSModel* const xsModel
00122         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00123     );
00124     
00125     XSWildcard
00126     (
00127         const ContentSpecNode* const elmWildCard
00128         , XSAnnotation* const annot
00129         , XSModel* const xsModel
00130         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00131     );
00132 
00134 
00137     ~XSWildcard();
00139 
00140     //---------------------
00144 
00148     NAMESPACE_CONSTRAINT getConstraintType() const;
00149 
00156     StringList *getNsConstraintList();
00157 
00162     PROCESS_CONTENTS getProcessContents() const;
00163 
00167     XSAnnotation *getAnnotation() const;
00168 
00170 
00171     //----------------------------------
00175 
00177 private:
00178 
00179     // -----------------------------------------------------------------------
00180     //  Unimplemented constructors and operators
00181     // -----------------------------------------------------------------------
00182     XSWildcard(const XSWildcard&);
00183     XSWildcard & operator=(const XSWildcard &);
00184 
00188    void buildNamespaceList(const ContentSpecNode* const rootNode);
00189 
00190 protected:
00191 
00192     // -----------------------------------------------------------------------
00193     //  data members
00194     // -----------------------------------------------------------------------
00195     NAMESPACE_CONSTRAINT fConstraintType;
00196     PROCESS_CONTENTS     fProcessContents;
00197     StringList*          fNsConstraintList;
00198     XSAnnotation*        fAnnotation;
00199 };
00200 
00201 inline XSAnnotation *XSWildcard::getAnnotation() const
00202 {
00203     return fAnnotation;
00204 }
00205 
00206 inline XSWildcard::PROCESS_CONTENTS XSWildcard::getProcessContents() const
00207 {
00208     return fProcessContents;
00209 }
00210 
00211 inline StringList* XSWildcard::getNsConstraintList()
00212 {
00213     return fNsConstraintList;
00214 }
00215 
00216 inline XSWildcard::NAMESPACE_CONSTRAINT XSWildcard::getConstraintType() const
00217 {
00218     return fConstraintType;
00219 }
00220 
00221 
00222 XERCES_CPP_NAMESPACE_END
00223 
00224 #endif


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