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_XSFACET_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XSFACET_HPP
0024 
0025 #include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 /**
0030  * This represents all Schema Facet components with the exception 
0031  * of Enumeration and Pattern Facets, which are represented by the 
0032  * XSMultiValueFacet interface.
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 XSFacet : 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  lexicalValue
0054       * @param  isFixed
0055       * @param  annot
0056       * @param  xsModel
0057       * @param  manager     The configurable memory manager
0058       */
0059     XSFacet
0060     (
0061         XSSimpleTypeDefinition::FACET facetKind
0062         , const XMLCh* const          lexicalValue
0063         , bool                        isFixed
0064         , XSAnnotation* const         annot
0065         , XSModel* const              xsModel
0066         , MemoryManager* const        manager = XMLPlatformUtils::fgMemoryManager
0067     );
0068 
0069     //@};
0070 
0071     /** @name Destructor */
0072     //@{
0073     ~XSFacet();
0074     //@}
0075 
0076     //---------------------
0077     /** @name XSFacet 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 a value of a constraining facet. 
0088      */
0089     const XMLCh *getLexicalFacetValue() const;
0090 
0091     /**
0092      * Check whether a facet value is fixed. 
0093      */
0094     bool isFixed() const;
0095 
0096     /**
0097      * @return an annotation
0098      */
0099     XSAnnotation *getAnnotation() const;
0100 
0101     //@}
0102 
0103     //----------------------------------
0104     /** methods needed by implementation */
0105 
0106     //@{
0107 
0108     //@}
0109 private:
0110 
0111     // -----------------------------------------------------------------------
0112     //  Unimplemented constructors and operators
0113     // -----------------------------------------------------------------------
0114     XSFacet(const XSFacet&);
0115     XSFacet & operator=(const XSFacet &);
0116 
0117 protected:
0118 
0119     // -----------------------------------------------------------------------
0120     //  data members
0121     // -----------------------------------------------------------------------
0122     XSSimpleTypeDefinition::FACET fFacetKind;
0123     bool                          fIsFixed;
0124     const XMLCh*                  fLexicalValue;
0125     XSAnnotation*                 fAnnotation;
0126 };
0127 
0128 inline XSSimpleTypeDefinition::FACET XSFacet::getFacetKind() const
0129 {   
0130     return fFacetKind;
0131 }
0132 
0133 inline const XMLCh* XSFacet::getLexicalFacetValue() const
0134 {
0135     return fLexicalValue;    
0136 }
0137 
0138 inline bool XSFacet::isFixed() const
0139 {
0140     return fIsFixed;
0141 }
0142 
0143 inline XSAnnotation* XSFacet::getAnnotation() const
0144 {
0145     return fAnnotation;
0146 }
0147 
0148 
0149 XERCES_CPP_NAMESPACE_END
0150 
0151 #endif