Xerces-C++: XMLContentModel.hpp Source File

| API Docs for SAX and DOM |
| Main Page Classes Files Related Pages # XMLContentModel.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: XMLContentModel.hpp 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022
    00023 #if !defined(CONTENTMODEL_HPP)
    00024 #define CONTENTMODEL_HPP
    00025
    00026 #include <xercesc/util/XMemory.hpp>
    00027 #include <xercesc/util/QName.hpp>
    00028
    00029 XERCES_CPP_NAMESPACE_BEGIN
    00030
    00031 class ContentLeafNameTypeVector;
    00032 class GrammarResolver;
    00033 class XMLStringPool;
    00034 class XMLValidator;
    00035 class SchemaGrammar;
    00036
    00046 class  XMLContentModel : public XMemory
    00047 {
    00048 public:
    00049     // ---------------------------------------------------------------------------
    00050     //  Public static data
    00051     //
    00052     //  gInvalidTrans
    00053     //      This value represents an invalid transition in each line of the
    00054     //      transition table.
    00055     //
    00056     //  gEOCFakeId
    00057     //  gEpsilonFakeId
    00058     //      We have to put in a couple of special CMLeaf nodes to represent
    00059     //      special values, using fake element ids that we know won't conflict
    00060     //      with real element ids.
    00061     //
    00062     //
    00063     // ---------------------------------------------------------------------------
    00064     static const unsigned int   gInvalidTrans;
    00065     static const unsigned int   gEOCFakeId;
    00066     static const unsigned int   gEpsilonFakeId;
    00067
    00068     // -----------------------------------------------------------------------
    00069     //  Constructors are hidden, only the virtual Destructor is exposed
    00070     // -----------------------------------------------------------------------
    00073     virtual ~XMLContentModel()
    00074     {
    00075     }
    00077
    00078
    00079     // -----------------------------------------------------------------------
    00080     //  The virtual content model interface provided by derived classes
    00081     // -----------------------------------------------------------------------
    00082     virtual int validateContent
    00083     (
    00084         QName** const         children
    00085       , const unsigned int    childCount
    00086       , const unsigned int    emptyNamespaceId
    00087     ) const = 0;
    00088
    00089     virtual int validateContentSpecial
    00090     (
    00091         QName** const           children
    00092       , const unsigned int      childCount
    00093       , const unsigned int      emptyNamespaceId
    00094       , GrammarResolver*  const pGrammarResolver
    00095       , XMLStringPool*    const pStringPool
    00096     ) const =0;
    00097
    00098     virtual void checkUniqueParticleAttribution
    00099     (
    00100         SchemaGrammar*    const pGrammar
    00101       , GrammarResolver*  const pGrammarResolver
    00102       , XMLStringPool*    const pStringPool
    00103       , XMLValidator*     const pValidator
    00104       , unsigned int*     const pContentSpecOrgURI
    00105       , const XMLCh*            pComplexTypeName = 0
    00106     ) =0;
    00107
    00108     virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
    00109       const = 0;
    00110
    00111     virtual unsigned int getNextState(const unsigned int currentState,
    00112                                       const unsigned int elementIndex) const = 0;
    00113
    00114 protected :
    00115     // -----------------------------------------------------------------------
    00116     //  Hidden Constructors
    00117     // -----------------------------------------------------------------------
    00118     XMLContentModel()
    00119     {
    00120     }
    00121
    00122
    00123 private :
    00124     // -----------------------------------------------------------------------
    00125     //  Unimplemented constructors and operators
    00126     // -----------------------------------------------------------------------
    00127     XMLContentModel(const XMLContentModel&);
    00128     XMLContentModel& operator=(const XMLContentModel&);
    00129 };
    00130
    00131 XERCES_CPP_NAMESPACE_END
    00132
    00133 #endif

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