1 | /*
|
---|
2 | * Copyright 2003,2004 The Apache Software Foundation.
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | */
|
---|
16 |
|
---|
17 | /*
|
---|
18 | * $Log: XSModelGroupDefinition.hpp,v $
|
---|
19 | * Revision 1.6 2004/09/08 13:56:08 peiyongz
|
---|
20 | * Apache License Version 2.0
|
---|
21 | *
|
---|
22 | * Revision 1.5 2003/12/01 23:23:26 neilg
|
---|
23 | * fix for bug 25118; thanks to Jeroen Witmond
|
---|
24 | *
|
---|
25 | * Revision 1.4 2003/11/21 17:29:53 knoaman
|
---|
26 | * PSVI update
|
---|
27 | *
|
---|
28 | * Revision 1.3 2003/11/14 22:47:53 neilg
|
---|
29 | * fix bogus log message from previous commit...
|
---|
30 | *
|
---|
31 | * Revision 1.2 2003/11/14 22:33:30 neilg
|
---|
32 | * Second phase of schema component model implementation.
|
---|
33 | * Implement XSModel, XSNamespaceItem, and the plumbing necessary
|
---|
34 | * to connect them to the other components.
|
---|
35 | * Thanks to David Cargill.
|
---|
36 | *
|
---|
37 | * Revision 1.1 2003/09/16 14:33:36 neilg
|
---|
38 | * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
|
---|
39 | *
|
---|
40 | */
|
---|
41 |
|
---|
42 | #if !defined(XSMODELGROUPDEFINITION_HPP)
|
---|
43 | #define XSMODELGROUPDEFINITION_HPP
|
---|
44 |
|
---|
45 | #include <xercesc/framework/psvi/XSObject.hpp>
|
---|
46 |
|
---|
47 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * This class describes all properties of a Schema Model Group
|
---|
51 | * Definition component.
|
---|
52 | * This is *always* owned by the validator /parser object from which
|
---|
53 | * it is obtained.
|
---|
54 | */
|
---|
55 |
|
---|
56 | // forward declarations
|
---|
57 | class XSAnnotation;
|
---|
58 | class XSModelGroup;
|
---|
59 | class XSParticle;
|
---|
60 | class XercesGroupInfo;
|
---|
61 |
|
---|
62 | class XMLPARSER_EXPORT XSModelGroupDefinition : public XSObject
|
---|
63 | {
|
---|
64 | public:
|
---|
65 |
|
---|
66 | // Constructors and Destructor
|
---|
67 | // -----------------------------------------------------------------------
|
---|
68 | /** @name Constructors */
|
---|
69 | //@{
|
---|
70 |
|
---|
71 | /**
|
---|
72 | * The default constructor
|
---|
73 | *
|
---|
74 | * @param groupInfo
|
---|
75 | * @param groupParticle
|
---|
76 | * @param annot
|
---|
77 | * @param xsModel
|
---|
78 | * @param manager The configurable memory manager
|
---|
79 | */
|
---|
80 | XSModelGroupDefinition
|
---|
81 | (
|
---|
82 | XercesGroupInfo* const groupInfo
|
---|
83 | , XSParticle* const groupParticle
|
---|
84 | , XSAnnotation* const annot
|
---|
85 | , XSModel* const xsModel
|
---|
86 | , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
---|
87 | );
|
---|
88 |
|
---|
89 | //@};
|
---|
90 |
|
---|
91 | /** @name Destructor */
|
---|
92 | //@{
|
---|
93 | ~XSModelGroupDefinition();
|
---|
94 | //@}
|
---|
95 |
|
---|
96 | //---------------------
|
---|
97 | /** @name overridden XSXSObject methods */
|
---|
98 | //@{
|
---|
99 |
|
---|
100 | /**
|
---|
101 | * The name of type <code>NCName</code> of this declaration as defined in
|
---|
102 | * XML Namespaces.
|
---|
103 | */
|
---|
104 | const XMLCh* getName();
|
---|
105 |
|
---|
106 | /**
|
---|
107 | * The [target namespace] of this object, or <code>null</code> if it is
|
---|
108 | * unspecified.
|
---|
109 | */
|
---|
110 | const XMLCh* getNamespace();
|
---|
111 |
|
---|
112 | /**
|
---|
113 | * A namespace schema information item corresponding to the target
|
---|
114 | * namespace of the component, if it's globally declared; or null
|
---|
115 | * otherwise.
|
---|
116 | */
|
---|
117 | XSNamespaceItem *getNamespaceItem();
|
---|
118 |
|
---|
119 | //@}
|
---|
120 |
|
---|
121 | //---------------------
|
---|
122 | /** @name XSModelGroupDefinition methods */
|
---|
123 |
|
---|
124 | //@{
|
---|
125 |
|
---|
126 | /**
|
---|
127 | * A model group.
|
---|
128 | */
|
---|
129 | XSModelGroup *getModelGroup();
|
---|
130 |
|
---|
131 | /**
|
---|
132 | * Optional. An [annotation].
|
---|
133 | */
|
---|
134 | XSAnnotation *getAnnotation() const;
|
---|
135 |
|
---|
136 | //@}
|
---|
137 |
|
---|
138 | //----------------------------------
|
---|
139 | /** methods needed by implementation */
|
---|
140 | //@{
|
---|
141 |
|
---|
142 | //@}
|
---|
143 | private:
|
---|
144 |
|
---|
145 | // -----------------------------------------------------------------------
|
---|
146 | // Unimplemented constructors and operators
|
---|
147 | // -----------------------------------------------------------------------
|
---|
148 | XSModelGroupDefinition(const XSModelGroupDefinition&);
|
---|
149 | XSModelGroupDefinition & operator=(const XSModelGroupDefinition &);
|
---|
150 |
|
---|
151 | protected:
|
---|
152 |
|
---|
153 | // -----------------------------------------------------------------------
|
---|
154 | // data members
|
---|
155 | // -----------------------------------------------------------------------
|
---|
156 | XercesGroupInfo* fGroupInfo;
|
---|
157 | XSParticle* fModelGroupParticle;
|
---|
158 | XSAnnotation* fAnnotation;
|
---|
159 | };
|
---|
160 |
|
---|
161 | inline XSAnnotation* XSModelGroupDefinition::getAnnotation() const
|
---|
162 | {
|
---|
163 | return fAnnotation;
|
---|
164 | }
|
---|
165 |
|
---|
166 |
|
---|
167 |
|
---|
168 | XERCES_CPP_NAMESPACE_END
|
---|
169 |
|
---|
170 | #endif
|
---|