source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/framework/psvi/XSModelGroup.hpp @ 2674

Revision 2674, 4.0 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: XSModelGroup.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#if !defined(XSMODELGROUP_HPP)
23#define XSMODELGROUP_HPP
24
25#include <xercesc/framework/psvi/XSObject.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29/**
30 * This class describes all properties of a Schema Model Group
31 * component.
32 * This is *always* owned by the validator /parser object from which
33 * it is obtained. 
34 */
35
36// forward declarations
37class XSAnnotation;
38class XSParticle;
39
40class XMLPARSER_EXPORT XSModelGroup : public XSObject
41{
42public:
43
44    // Content model compositors
45    enum COMPOSITOR_TYPE {
46            /**
47             * This constant value signifies a sequence operator.
48             */
49            COMPOSITOR_SEQUENCE       = 1,
50            /**
51             * This constant value signifies a choice operator.
52             */
53            COMPOSITOR_CHOICE         = 2,
54            /**
55             * This content model represents a simplified version of the SGML
56             * &amp;-Connector and is limited to the top-level of any content model.
57             * No element in the all content model may appear more than once.
58             */
59            COMPOSITOR_ALL            = 3
60    };
61       
62    //  Constructors and Destructor
63    // -----------------------------------------------------------------------
64    /** @name Constructors */
65    //@{
66
67    /**
68      * The default constructor
69      *
70      * @param  compositorType
71      * @param  particleList
72      * @param  annot
73      * @param  xsModel
74      * @param  manager     The configurable memory manager
75      */
76    XSModelGroup
77    (
78        COMPOSITOR_TYPE compositorType
79        , XSParticleList* const particleList
80        , XSAnnotation* const annot
81        , XSModel* const xsModel
82        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
83    );
84
85    //@};
86
87    /** @name Destructor */
88    //@{
89    ~XSModelGroup();
90    //@}
91
92    //---------------------
93    /** @name XSModelGroup methods */
94    //@{
95
96    /**
97     * [compositor]: one of all, choice or sequence. The valid constants
98     * values are:
99     * <code>COMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL</code>.
100     */
101    COMPOSITOR_TYPE getCompositor() const;
102
103    /**
104     *  A list of [particles].
105     */
106    XSParticleList *getParticles() const;
107
108    /**
109     * Optional. An [annotation].
110     */
111    XSAnnotation *getAnnotation() const;
112
113    //@}
114
115    //----------------------------------
116    /** methods needed by implementation */
117
118    //@{
119
120    //@}
121private:
122
123    // -----------------------------------------------------------------------
124    //  Unimplemented constructors and operators
125    // -----------------------------------------------------------------------
126    XSModelGroup(const XSModelGroup&);
127    XSModelGroup & operator=(const XSModelGroup &);
128
129protected:
130
131    // -----------------------------------------------------------------------
132    //  data members
133    // -----------------------------------------------------------------------
134    COMPOSITOR_TYPE fCompositorType;
135    XSParticleList* fParticleList;
136    XSAnnotation*   fAnnotation;
137};
138
139inline XSModelGroup::COMPOSITOR_TYPE XSModelGroup::getCompositor() const
140{
141    return fCompositorType;
142}
143
144inline XSParticleList* XSModelGroup::getParticles() const
145{
146    return fParticleList;
147}
148
149inline XSAnnotation* XSModelGroup::getAnnotation() const
150{
151    return fAnnotation;
152}
153
154XERCES_CPP_NAMESPACE_END
155
156#endif
Note: See TracBrowser for help on using the repository browser.