|
||||
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_XSATTRIBUTEUSE_HPP) 0023 #define XERCESC_INCLUDE_GUARD_XSATTRIBUTEUSE_HPP 0024 0025 #include <xercesc/framework/psvi/XSObject.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 /** 0030 * This class describes all properties of a Schema Attribute 0031 * Use component. 0032 * This is *always* owned by the validator /parser object from which 0033 * it is obtained. 0034 */ 0035 0036 // forward declarations 0037 class XSAttributeDeclaration; 0038 0039 class XMLPARSER_EXPORT XSAttributeUse : public XSObject 0040 { 0041 public: 0042 0043 // Constructors and Destructor 0044 // ----------------------------------------------------------------------- 0045 /** @name Constructors */ 0046 //@{ 0047 0048 /** 0049 * The default constructor 0050 * @param xsAttDecl 0051 * @param xsModel 0052 * @param manager The configurable memory manager 0053 */ 0054 XSAttributeUse 0055 ( 0056 XSAttributeDeclaration* const xsAttDecl, 0057 XSModel* const xsModel, 0058 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 0059 ); 0060 0061 //@}; 0062 0063 /** @name Destructor */ 0064 //@{ 0065 ~XSAttributeUse(); 0066 //@} 0067 0068 //--------------------- 0069 /** @name XSAttributeUse methods */ 0070 0071 //@{ 0072 0073 /** 0074 * [required]: determines whether this use of an attribute declaration 0075 * requires an appropriate attribute information item to be present, or 0076 * merely allows it. 0077 */ 0078 bool getRequired() const; 0079 0080 /** 0081 * [attribute declaration]: provides the attribute declaration itself, 0082 * which will in turn determine the simple type definition used. 0083 */ 0084 XSAttributeDeclaration *getAttrDeclaration() const; 0085 0086 /** 0087 * Value Constraint: one of default, fixed. 0088 */ 0089 XSConstants::VALUE_CONSTRAINT getConstraintType() const; 0090 0091 /** 0092 * Value Constraint: The actual value. 0093 */ 0094 const XMLCh *getConstraintValue(); 0095 0096 //@} 0097 0098 //---------------------------------- 0099 /** methods needed by implementation */ 0100 0101 //@{ 0102 0103 //@} 0104 0105 private: 0106 0107 // set data 0108 void set 0109 ( 0110 const bool isRequired 0111 , XSConstants::VALUE_CONSTRAINT constraintType 0112 , const XMLCh* const constraintValue 0113 ); 0114 0115 friend class XSObjectFactory; 0116 0117 // ----------------------------------------------------------------------- 0118 // Unimplemented constructors and operators 0119 // ----------------------------------------------------------------------- 0120 XSAttributeUse(const XSAttributeUse&); 0121 XSAttributeUse & operator=(const XSAttributeUse &); 0122 0123 protected: 0124 0125 // ----------------------------------------------------------------------- 0126 // data members 0127 // ----------------------------------------------------------------------- 0128 bool fRequired; 0129 XSConstants::VALUE_CONSTRAINT fConstraintType; 0130 const XMLCh* fConstraintValue; 0131 XSAttributeDeclaration* fXSAttributeDeclaration; 0132 }; 0133 0134 inline XSAttributeDeclaration *XSAttributeUse::getAttrDeclaration() const 0135 { 0136 return fXSAttributeDeclaration; 0137 } 0138 0139 inline bool XSAttributeUse::getRequired() const 0140 { 0141 return fRequired; 0142 } 0143 0144 inline XSConstants::VALUE_CONSTRAINT XSAttributeUse::getConstraintType() const 0145 { 0146 return fConstraintType; 0147 } 0148 0149 inline const XMLCh *XSAttributeUse::getConstraintValue() 0150 { 0151 return fConstraintValue; 0152 } 0153 0154 XERCES_CPP_NAMESPACE_END 0155 0156 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |