source: obsolete/tags/VUT/0.4/GtpVisibilityPreprocessor/support/xerces/include/xercesc/framework/psvi/XSMultiValueFacet.hpp @ 358

Revision 358, 5.1 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
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: XSMultiValueFacet.hpp,v $
19 * Revision 1.7  2004/09/08 13:56:09  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.6  2003/12/01 23:23:26  neilg
23 * fix for bug 25118; thanks to Jeroen Witmond
24 *
25 * Revision 1.5  2003/11/21 17:34:04  knoaman
26 * PSVI update
27 *
28 * Revision 1.4  2003/11/14 22:47:53  neilg
29 * fix bogus log message from previous commit...
30 *
31 * Revision 1.3  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.2  2003/11/06 15:30:04  neilg
38 * 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.
39 *
40 * Revision 1.1  2003/09/16 14:33:36  neilg
41 * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
42 *
43 */
44
45#if !defined(XSMULTIVALUEFACET_HPP)
46#define XSMULTIVALUEFACET_HPP
47
48#include <xercesc/framework/psvi/XSObject.hpp>
49#include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
50
51XERCES_CPP_NAMESPACE_BEGIN
52
53/**
54 * This class represents all Schema Facets which may possess multiple
55 * lexical values/annotations (i.e., Pattern and Enumeration facets).
56 * This is *always* owned by the validator /parser object from which
57 * it is obtained. 
58 */
59
60// forward declarations
61class XSAnnotation;
62
63class XMLPARSER_EXPORT XSMultiValueFacet : public XSObject
64{
65public:
66
67    //  Constructors and Destructor
68    // -----------------------------------------------------------------------
69    /** @name Constructors */
70    //@{
71
72    /**
73      * The default constructor
74      *
75      * @param  facetKind
76      * @param  lexicalValues
77      * @param  isFixed
78      * @param  headAnnot
79      * @param  xsModel
80      * @param  manager     The configurable memory manager
81      */
82    XSMultiValueFacet
83    (
84        XSSimpleTypeDefinition::FACET facetKind
85        , StringList*                 lexicalValues
86        , bool                        isFixed
87        , XSAnnotation* const         headAnnot
88        , XSModel* const              xsModel
89        , MemoryManager* const        manager = XMLPlatformUtils::fgMemoryManager
90    );
91
92    //@};
93
94    /** @name Destructor */
95    //@{
96    ~XSMultiValueFacet();
97    //@}
98
99    //---------------------
100    /** @name XSMultiValueFacet methods */
101
102    //@{
103
104    /**
105     * @return An indication as to the facet's type; see <code>XSSimpleTypeDefinition::FACET</code>
106     */
107    XSSimpleTypeDefinition::FACET getFacetKind() const;
108
109    /**
110     * @return Returns the values of a constraining facet.
111     */
112    StringList *getLexicalFacetValues();   
113
114    /**
115     * Check whether a facet value is fixed.
116     */
117    bool isFixed() const;
118
119    /**
120     * @return the annotations belonging to this facet's values
121     */
122    XSAnnotationList *getAnnotations();
123
124    //@}
125
126    //----------------------------------
127    /** methods needed by implementation */
128
129    //@{
130
131    //@}
132private:
133
134    // -----------------------------------------------------------------------
135    //  Unimplemented constructors and operators
136    // -----------------------------------------------------------------------
137    XSMultiValueFacet(const XSMultiValueFacet&);
138    XSMultiValueFacet & operator=(const XSMultiValueFacet &);
139
140protected:
141
142    // -----------------------------------------------------------------------
143    //  data members
144    // -----------------------------------------------------------------------
145    XSSimpleTypeDefinition::FACET fFacetKind;
146    bool                          fIsFixed;
147    StringList*                   fLexicalValues;  // not owned by this class
148    XSAnnotationList*             fXSAnnotationList;
149};
150
151
152inline XSSimpleTypeDefinition::FACET XSMultiValueFacet::getFacetKind() const
153{
154    return fFacetKind;
155}
156
157inline bool XSMultiValueFacet::isFixed() const
158{
159    return fIsFixed;
160}
161
162inline StringList *XSMultiValueFacet::getLexicalFacetValues()
163{
164    return fLexicalValues;
165}
166
167inline XSAnnotationList *XSMultiValueFacet::getAnnotations()
168{
169    return fXSAnnotationList;
170}
171
172
173XERCES_CPP_NAMESPACE_END
174
175#endif
Note: See TracBrowser for help on using the repository browser.