Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:52

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  * 
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  * 
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_XSMODELGROUP_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XSMODELGROUP_HPP
0024 
0025 #include <xercesc/framework/psvi/XSObject.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 /**
0030  * This class describes all properties of a Schema Model Group
0031  * component.
0032  * This is *always* owned by the validator /parser object from which
0033  * it is obtained.  
0034  */
0035 
0036 // forward declarations
0037 class XSAnnotation;
0038 class XSParticle;
0039 
0040 class XMLPARSER_EXPORT XSModelGroup : public XSObject
0041 {
0042 public:
0043 
0044     // Content model compositors
0045     enum COMPOSITOR_TYPE {
0046         /**
0047          * This constant value signifies a sequence operator.
0048          */
0049         COMPOSITOR_SEQUENCE       = 1,
0050         /**
0051          * This constant value signifies a choice operator.
0052          */
0053         COMPOSITOR_CHOICE         = 2,
0054         /**
0055          * This content model represents a simplified version of the SGML 
0056          * &amp;-Connector and is limited to the top-level of any content model. 
0057          * No element in the all content model may appear more than once.
0058          */
0059         COMPOSITOR_ALL            = 3
0060     };
0061     
0062     //  Constructors and Destructor
0063     // -----------------------------------------------------------------------
0064     /** @name Constructors */
0065     //@{
0066 
0067     /**
0068       * The default constructor 
0069       *
0070       * @param  compositorType
0071       * @param  particleList
0072       * @param  annot
0073       * @param  xsModel
0074       * @param  manager     The configurable memory manager
0075       */
0076     XSModelGroup
0077     (
0078         COMPOSITOR_TYPE compositorType
0079         , XSParticleList* const particleList
0080         , XSAnnotation* const annot
0081         , XSModel* const xsModel
0082         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0083     );
0084 
0085     //@};
0086 
0087     /** @name Destructor */
0088     //@{
0089     ~XSModelGroup();
0090     //@}
0091 
0092     //---------------------
0093     /** @name XSModelGroup methods */
0094     //@{
0095 
0096     /**
0097      * [compositor]: one of all, choice or sequence. The valid constants 
0098      * values are: 
0099      * <code>COMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL</code>. 
0100      */
0101     COMPOSITOR_TYPE getCompositor() const;
0102 
0103     /**
0104      *  A list of [particles]. 
0105      */
0106     XSParticleList *getParticles() const;
0107 
0108     /**
0109      * Optional. An [annotation]. 
0110      */
0111     XSAnnotation *getAnnotation() const;
0112 
0113     //@}
0114 
0115     //----------------------------------
0116     /** methods needed by implementation */
0117 
0118     //@{
0119 
0120     //@}
0121 private:
0122 
0123     // -----------------------------------------------------------------------
0124     //  Unimplemented constructors and operators
0125     // -----------------------------------------------------------------------
0126     XSModelGroup(const XSModelGroup&);
0127     XSModelGroup & operator=(const XSModelGroup &);
0128 
0129 protected:
0130 
0131     // -----------------------------------------------------------------------
0132     //  data members
0133     // -----------------------------------------------------------------------
0134     COMPOSITOR_TYPE fCompositorType;
0135     XSParticleList* fParticleList;
0136     XSAnnotation*   fAnnotation;
0137 };
0138 
0139 inline XSModelGroup::COMPOSITOR_TYPE XSModelGroup::getCompositor() const
0140 {
0141     return fCompositorType;
0142 }
0143 
0144 inline XSParticleList* XSModelGroup::getParticles() const
0145 {
0146     return fParticleList;
0147 }
0148 
0149 inline XSAnnotation* XSModelGroup::getAnnotation() const
0150 {
0151     return fAnnotation;
0152 }
0153 
0154 XERCES_CPP_NAMESPACE_END
0155 
0156 #endif