|
||||
File indexing completed on 2025-01-18 10:15:18
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_DTDATTDEF_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DTDATTDEF_HPP 0024 0025 #include <xercesc/framework/XMLAttDef.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 // 0030 // This class is a derivative of the core XMLAttDef class. This class adds 0031 // any DTD specific data members and provides DTD specific implementations 0032 // of any underlying attribute def virtual methods. 0033 // 0034 // In the DTD we don't do namespaces, so the attribute names are just the 0035 // QName literally from the DTD. This is what we return as the full name, 0036 // which is what is used to key these in any name keyed collections. 0037 // 0038 class VALIDATORS_EXPORT DTDAttDef : public XMLAttDef 0039 { 0040 public : 0041 // ----------------------------------------------------------------------- 0042 // Constructors and Destructors 0043 // ----------------------------------------------------------------------- 0044 DTDAttDef(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0045 DTDAttDef 0046 ( 0047 const XMLCh* const attName 0048 , const XMLAttDef::AttTypes type = CData 0049 , const XMLAttDef::DefAttTypes defType = Implied 0050 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 0051 ); 0052 DTDAttDef 0053 ( 0054 const XMLCh* const attName 0055 , const XMLCh* const attValue 0056 , const XMLAttDef::AttTypes type 0057 , const XMLAttDef::DefAttTypes defType 0058 , const XMLCh* const enumValues = 0 0059 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 0060 ); 0061 ~DTDAttDef(); 0062 0063 0064 // ----------------------------------------------------------------------- 0065 // Implementation of the XMLAttDef interface 0066 // ----------------------------------------------------------------------- 0067 virtual const XMLCh* getFullName() const; 0068 0069 //does nothing currently 0070 virtual void reset() {}; 0071 0072 // ----------------------------------------------------------------------- 0073 // Getter methods 0074 // ----------------------------------------------------------------------- 0075 XMLSize_t getElemId() const; 0076 0077 // ----------------------------------------------------------------------- 0078 // Setter methods 0079 // ----------------------------------------------------------------------- 0080 void setElemId(const XMLSize_t newId); 0081 void setName(const XMLCh* const newName); 0082 0083 /*** 0084 * Support for Serialization/De-serialization 0085 ***/ 0086 DECL_XSERIALIZABLE(DTDAttDef) 0087 0088 private : 0089 // ----------------------------------------------------------------------- 0090 // Unimplemented constructors and operators 0091 // ----------------------------------------------------------------------- 0092 DTDAttDef(const DTDAttDef &); 0093 DTDAttDef& operator = (const DTDAttDef&); 0094 0095 // ----------------------------------------------------------------------- 0096 // Private data members 0097 // 0098 // fElemId 0099 // This is the id of the element (the id is into the element decl 0100 // pool) of the element this attribute def said it belonged to. 0101 // This is used later to link back to the element, mostly for 0102 // validation purposes. 0103 // 0104 // fName 0105 // This is the name of the attribute. Since we don't do namespaces 0106 // in the DTD, its just the fully qualified name. 0107 // ----------------------------------------------------------------------- 0108 XMLSize_t fElemId; 0109 XMLCh* fName; 0110 }; 0111 0112 0113 // --------------------------------------------------------------------------- 0114 // DTDAttDef: Implementation of the XMLAttDef interface 0115 // --------------------------------------------------------------------------- 0116 inline const XMLCh* DTDAttDef::getFullName() const 0117 { 0118 return fName; 0119 } 0120 0121 0122 // --------------------------------------------------------------------------- 0123 // DTDAttDef: Getter methods 0124 // --------------------------------------------------------------------------- 0125 inline XMLSize_t DTDAttDef::getElemId() const 0126 { 0127 return fElemId; 0128 } 0129 0130 // --------------------------------------------------------------------------- 0131 // DTDAttDef: Setter methods 0132 // --------------------------------------------------------------------------- 0133 inline void DTDAttDef::setElemId(const XMLSize_t newId) 0134 { 0135 fElemId = newId; 0136 } 0137 0138 0139 XERCES_CPP_NAMESPACE_END 0140 0141 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |