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_XSMULTIVALUEFACET_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XSMULTIVALUEFACET_HPP
0024 
0025 #include <xercesc/framework/psvi/XSObject.hpp>
0026 #include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
0027 
0028 XERCES_CPP_NAMESPACE_BEGIN
0029 
0030 /**
0031  * This class represents all Schema Facets which may possess multiple
0032  * lexical values/annotations (i.e., Pattern and Enumeration facets).
0033  * This is *always* owned by the validator /parser object from which
0034  * it is obtained.  
0035  */
0036 
0037 // forward declarations
0038 class XSAnnotation;
0039 
0040 class XMLPARSER_EXPORT XSMultiValueFacet : public XSObject
0041 {
0042 public:
0043 
0044     //  Constructors and Destructor
0045     // -----------------------------------------------------------------------
0046     /** @name Constructors */
0047     //@{
0048 
0049     /**
0050       * The default constructor 
0051       *
0052       * @param  facetKind
0053       * @param  lexicalValues
0054       * @param  isFixed
0055       * @param  headAnnot
0056       * @param  xsModel
0057       * @param  manager     The configurable memory manager
0058       */
0059     XSMultiValueFacet
0060     (
0061         XSSimpleTypeDefinition::FACET facetKind
0062         , StringList*                 lexicalValues
0063         , bool                        isFixed
0064         , XSAnnotation* const         headAnnot
0065         , XSModel* const              xsModel
0066         , MemoryManager* const        manager = XMLPlatformUtils::fgMemoryManager
0067     );
0068 
0069     //@};
0070 
0071     /** @name Destructor */
0072     //@{
0073     ~XSMultiValueFacet();
0074     //@}
0075 
0076     //---------------------
0077     /** @name XSMultiValueFacet methods */
0078 
0079     //@{
0080 
0081     /**
0082      * @return An indication as to the facet's type; see <code>XSSimpleTypeDefinition::FACET</code>
0083      */
0084     XSSimpleTypeDefinition::FACET getFacetKind() const;
0085 
0086     /**
0087      * @return Returns the values of a constraining facet. 
0088      */
0089     StringList *getLexicalFacetValues();   
0090 
0091     /**
0092      * Check whether a facet value is fixed. 
0093      */
0094     bool isFixed() const;
0095 
0096     /**
0097      * @return the annotations belonging to this facet's values
0098      */
0099     XSAnnotationList *getAnnotations();
0100 
0101     //@}
0102 
0103     //----------------------------------
0104     /** methods needed by implementation */
0105 
0106     //@{
0107 
0108     //@}
0109 private:
0110 
0111     // -----------------------------------------------------------------------
0112     //  Unimplemented constructors and operators
0113     // -----------------------------------------------------------------------
0114     XSMultiValueFacet(const XSMultiValueFacet&);
0115     XSMultiValueFacet & operator=(const XSMultiValueFacet &);
0116 
0117 protected:
0118 
0119     // -----------------------------------------------------------------------
0120     //  data members
0121     // -----------------------------------------------------------------------
0122     XSSimpleTypeDefinition::FACET fFacetKind;
0123     bool                          fIsFixed;
0124     StringList*                   fLexicalValues;  // not owned by this class
0125     XSAnnotationList*             fXSAnnotationList;
0126 };
0127 
0128 
0129 inline XSSimpleTypeDefinition::FACET XSMultiValueFacet::getFacetKind() const
0130 {
0131     return fFacetKind;
0132 }
0133 
0134 inline bool XSMultiValueFacet::isFixed() const
0135 {
0136     return fIsFixed;
0137 }
0138 
0139 inline StringList *XSMultiValueFacet::getLexicalFacetValues()
0140 {
0141     return fLexicalValues; 
0142 }
0143 
0144 inline XSAnnotationList *XSMultiValueFacet::getAnnotations()
0145 {
0146     return fXSAnnotationList;
0147 }
0148 
0149 
0150 XERCES_CPP_NAMESPACE_END
0151 
0152 #endif