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: XSAttributeGroupDefinition.hpp,v $
|
---|
19 | * Revision 1.8 2004/09/08 13:56:08 peiyongz
|
---|
20 | * Apache License Version 2.0
|
---|
21 | *
|
---|
22 | * Revision 1.7 2003/12/01 23:23:26 neilg
|
---|
23 | * fix for bug 25118; thanks to Jeroen Witmond
|
---|
24 | *
|
---|
25 | * Revision 1.6 2003/11/21 22:34:45 neilg
|
---|
26 | * More schema component model implementation, thanks to David Cargill.
|
---|
27 | * In particular, this cleans up and completes the XSModel, XSNamespaceItem,
|
---|
28 | * XSAttributeDeclaration and XSAttributeGroup implementations.
|
---|
29 | *
|
---|
30 | * Revision 1.5 2003/11/21 17:19:30 knoaman
|
---|
31 | * PSVI update.
|
---|
32 | *
|
---|
33 | * Revision 1.4 2003/11/14 22:47:53 neilg
|
---|
34 | * fix bogus log message from previous commit...
|
---|
35 | *
|
---|
36 | * Revision 1.3 2003/11/14 22:33:30 neilg
|
---|
37 | * Second phase of schema component model implementation.
|
---|
38 | * Implement XSModel, XSNamespaceItem, and the plumbing necessary
|
---|
39 | * to connect them to the other components.
|
---|
40 | * Thanks to David Cargill.
|
---|
41 | *
|
---|
42 | * Revision 1.2 2003/11/06 15:30:04 neilg
|
---|
43 | * 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.
|
---|
44 | *
|
---|
45 | * Revision 1.1 2003/09/16 14:33:36 neilg
|
---|
46 | * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
|
---|
47 | *
|
---|
48 | */
|
---|
49 |
|
---|
50 | #if !defined(XSATTRIBUTEGROUPDEFINITION_HPP)
|
---|
51 | #define XSATTRIBUTEGROUPDEFINITION_HPP
|
---|
52 |
|
---|
53 | #include <xercesc/framework/psvi/XSObject.hpp>
|
---|
54 |
|
---|
55 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * This class describes all properties of a Schema Attribute
|
---|
59 | * Group Definition component.
|
---|
60 | * This is *always* owned by the validator /parser object from which
|
---|
61 | * it is obtained.
|
---|
62 | */
|
---|
63 |
|
---|
64 | // forward declarations
|
---|
65 | class XSAnnotation;
|
---|
66 | class XSAttributeUse;
|
---|
67 | class XSWildcard;
|
---|
68 | class XercesAttGroupInfo;
|
---|
69 |
|
---|
70 | class XMLPARSER_EXPORT XSAttributeGroupDefinition : public XSObject
|
---|
71 | {
|
---|
72 | public:
|
---|
73 |
|
---|
74 | // Constructors and Destructor
|
---|
75 | // -----------------------------------------------------------------------
|
---|
76 | /** @name Constructors */
|
---|
77 | //@{
|
---|
78 |
|
---|
79 | /**
|
---|
80 | * The default constructor
|
---|
81 | *
|
---|
82 | * @param xercesAttGroupInfo
|
---|
83 | * @param xsAttList
|
---|
84 | * @param xsWildcard
|
---|
85 | * @param xsAnnot
|
---|
86 | * @param xsModel
|
---|
87 | * @param manager The configurable memory manager
|
---|
88 | */
|
---|
89 | XSAttributeGroupDefinition
|
---|
90 | (
|
---|
91 | XercesAttGroupInfo* const xercesAttGroupInfo
|
---|
92 | , XSAttributeUseList* const xsAttList
|
---|
93 | , XSWildcard* const xsWildcard
|
---|
94 | , XSAnnotation* const xsAnnot
|
---|
95 | , XSModel* const xsModel
|
---|
96 | , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
---|
97 | );
|
---|
98 |
|
---|
99 | //@};
|
---|
100 |
|
---|
101 | /** @name Destructor */
|
---|
102 | //@{
|
---|
103 | ~XSAttributeGroupDefinition();
|
---|
104 | //@}
|
---|
105 |
|
---|
106 | //---------------------
|
---|
107 | /** @name overridden XSObject methods */
|
---|
108 | //@{
|
---|
109 |
|
---|
110 | /**
|
---|
111 | * The name of type <code>NCName</code> of this declaration as defined in
|
---|
112 | * XML Namespaces.
|
---|
113 | */
|
---|
114 | const XMLCh* getName();
|
---|
115 |
|
---|
116 | /**
|
---|
117 | * The [target namespace] of this object, or <code>null</code> if it is
|
---|
118 | * unspecified.
|
---|
119 | */
|
---|
120 | const XMLCh* getNamespace();
|
---|
121 |
|
---|
122 | /**
|
---|
123 | * A namespace schema information item corresponding to the target
|
---|
124 | * namespace of the component, if it's globally declared; or null
|
---|
125 | * otherwise.
|
---|
126 | */
|
---|
127 | XSNamespaceItem* getNamespaceItem();
|
---|
128 |
|
---|
129 | //@}
|
---|
130 |
|
---|
131 | //---------------------
|
---|
132 | /** @name XSAttributeGroupDefinition methods */
|
---|
133 |
|
---|
134 | //@{
|
---|
135 |
|
---|
136 | /**
|
---|
137 | * A set of [attribute uses].
|
---|
138 | */
|
---|
139 | XSAttributeUseList *getAttributeUses();
|
---|
140 |
|
---|
141 | /**
|
---|
142 | * Optional. A [wildcard].
|
---|
143 | */
|
---|
144 | XSWildcard *getAttributeWildcard() const;
|
---|
145 |
|
---|
146 | /**
|
---|
147 | * Optional. An [annotation].
|
---|
148 | */
|
---|
149 | XSAnnotation *getAnnotation() const;
|
---|
150 |
|
---|
151 | //@}
|
---|
152 |
|
---|
153 | //----------------------------------
|
---|
154 | /** methods needed by implementation */
|
---|
155 |
|
---|
156 | //@{
|
---|
157 |
|
---|
158 | //@}
|
---|
159 | private:
|
---|
160 |
|
---|
161 | // -----------------------------------------------------------------------
|
---|
162 | // Unimplemented constructors and operators
|
---|
163 | // -----------------------------------------------------------------------
|
---|
164 | XSAttributeGroupDefinition(const XSAttributeGroupDefinition&);
|
---|
165 | XSAttributeGroupDefinition & operator=(const XSAttributeGroupDefinition &);
|
---|
166 |
|
---|
167 | protected:
|
---|
168 |
|
---|
169 | // -----------------------------------------------------------------------
|
---|
170 | // data members
|
---|
171 | // -----------------------------------------------------------------------
|
---|
172 | XercesAttGroupInfo* fXercesAttGroupInfo;
|
---|
173 | XSAttributeUseList* fXSAttributeUseList;
|
---|
174 | XSWildcard* fXSWildcard;
|
---|
175 | XSAnnotation* fAnnotation;
|
---|
176 | };
|
---|
177 |
|
---|
178 | inline XSAttributeUseList* XSAttributeGroupDefinition::getAttributeUses()
|
---|
179 | {
|
---|
180 | return fXSAttributeUseList;
|
---|
181 | }
|
---|
182 |
|
---|
183 | inline XSWildcard* XSAttributeGroupDefinition::getAttributeWildcard() const
|
---|
184 | {
|
---|
185 | return fXSWildcard;
|
---|
186 | }
|
---|
187 |
|
---|
188 | inline XSAnnotation* XSAttributeGroupDefinition::getAnnotation() const
|
---|
189 | {
|
---|
190 | return fAnnotation;
|
---|
191 | }
|
---|
192 |
|
---|
193 | XERCES_CPP_NAMESPACE_END
|
---|
194 |
|
---|
195 | #endif
|
---|