00001 /* 00002 * Copyright 2003,2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* 00018 * $Id: XSFacet.hpp 191054 2005-06-17 02:56:35Z jberry $ 00019 */ 00020 00021 #if !defined(XSFACET_HPP) 00022 #define XSFACET_HPP 00023 00024 #include <xercesc/framework/psvi/XSSimpleTypeDefinition.hpp> 00025 00026 XERCES_CPP_NAMESPACE_BEGIN 00027 00036 // forward declarations 00037 class XSAnnotation; 00038 00039 class XSFacet : public XSObject 00040 { 00041 public: 00042 00043 // Constructors and Destructor 00044 // ----------------------------------------------------------------------- 00047 00058 XSFacet 00059 ( 00060 XSSimpleTypeDefinition::FACET facetKind 00061 , const XMLCh* const lexicalValue 00062 , bool isFixed 00063 , XSAnnotation* const annot 00064 , XSModel* const xsModel 00065 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 00066 ); 00067 00069 00072 ~XSFacet(); 00074 00075 //--------------------- 00079 00083 XSSimpleTypeDefinition::FACET getFacetKind() const; 00084 00088 const XMLCh *getLexicalFacetValue() const; 00089 00093 bool isFixed() const; 00094 00098 XSAnnotation *getAnnotation() const; 00099 00101 00102 //---------------------------------- 00106 00108 private: 00109 00110 // ----------------------------------------------------------------------- 00111 // Unimplemented constructors and operators 00112 // ----------------------------------------------------------------------- 00113 XSFacet(const XSFacet&); 00114 XSFacet & operator=(const XSFacet &); 00115 00116 protected: 00117 00118 // ----------------------------------------------------------------------- 00119 // data members 00120 // ----------------------------------------------------------------------- 00121 XSSimpleTypeDefinition::FACET fFacetKind; 00122 bool fIsFixed; 00123 const XMLCh* fLexicalValue; 00124 XSAnnotation* fAnnotation; 00125 }; 00126 00127 inline XSSimpleTypeDefinition::FACET XSFacet::getFacetKind() const 00128 { 00129 return fFacetKind; 00130 } 00131 00132 inline const XMLCh* XSFacet::getLexicalFacetValue() const 00133 { 00134 return fLexicalValue; 00135 } 00136 00137 inline bool XSFacet::isFixed() const 00138 { 00139 return fIsFixed; 00140 } 00141 00142 inline XSAnnotation* XSFacet::getAnnotation() const 00143 { 00144 return fAnnotation; 00145 } 00146 00147 00148 XERCES_CPP_NAMESPACE_END 00149 00150 #endif