Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

AttributeListImpl.hpp

Go to the documentation of this file.
00001 /* 00002 * Copyright 1999-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 #if !defined(ATTRIBUTELISTIMPL_HEADER_GUARD_1357924680) 00017 #define ATTRIBUTELISTIMPL_HEADER_GUARD_1357924680 00018 00019 00020 00021 // Base include file. Must be first. 00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00023 00024 00025 00026 #include <vector> 00027 00028 00029 00030 #include <xercesc/sax/AttributeList.hpp> 00031 00032 00033 00034 00035 XALAN_CPP_NAMESPACE_BEGIN 00036 00037 00038 00039 class AttributeVectorEntry; 00040 00041 00042 00043 typedef XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType; 00044 00045 00046 00047 class XALAN_PLATFORMSUPPORT_EXPORT AttributeListImpl : public AttributeListType 00048 { 00049 public: 00050 00051 explicit 00052 AttributeListImpl(); 00053 00054 virtual 00055 ~AttributeListImpl(); 00056 00057 AttributeListImpl(const AttributeListImpl& theSource); 00058 00059 AttributeListImpl(const AttributeListType& theSource); 00060 00061 AttributeListImpl& 00062 operator=(const AttributeListImpl& theRHS); 00063 00064 AttributeListImpl& 00065 operator=(const AttributeListType& theRHS); 00066 00067 // These are inherited from AttributeList 00068 virtual unsigned int 00069 getLength() const; 00070 00071 virtual const XMLCh* 00072 getName(const unsigned int index) const; 00073 00074 virtual const XMLCh* 00075 getType(const unsigned int index) const; 00076 00077 virtual const XMLCh* 00078 getValue(const unsigned int index) const; 00079 00080 virtual const XMLCh* 00081 getType(const XMLCh* const name) const; 00082 00083 virtual const XMLCh* 00084 getValue(const XMLCh* const name) const; 00085 00086 virtual const XMLCh* 00087 getValue(const char* const name) const; 00088 00089 // The mutators are new to this class. 00090 00094 virtual void 00095 clear(); 00096 00104 virtual bool 00105 addAttribute( 00106 const XMLCh* name, 00107 const XMLCh* type, 00108 const XMLCh* value); 00109 00115 virtual bool 00116 removeAttribute(const XMLCh* name); 00117 00124 void 00125 swap(AttributeListImpl& theOther) 00126 { 00127 m_AttributeVector.swap(theOther.m_AttributeVector); 00128 } 00129 00136 void 00137 reserve(unsigned int theCount) 00138 { 00139 m_AttributeVector.reserve(theCount); 00140 } 00141 00142 #if defined(XALAN_NO_STD_NAMESPACE) 00143 // This vector will hold the entries. 00144 typedef vector<AttributeVectorEntry*> AttributeVectorType; 00145 #else 00146 // This vector will hold the entries. 00147 typedef std::vector<AttributeVectorEntry*> AttributeVectorType; 00148 #endif 00149 00150 #if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION) 00151 struct NameCompareFunctor 00152 { 00153 NameCompareFunctor(const XMLCh* theName) : 00154 m_name(theName) 00155 { 00156 } 00157 00158 bool 00159 operator()(const AttributeVectorEntry* theEntry) const; 00160 00161 private: 00162 00163 const XMLCh* const m_name; 00164 }; 00165 #endif 00166 00167 private: 00168 00169 // This is not implemented. 00170 bool 00171 operator==(const AttributeListImpl&) const; 00172 00173 // Default vector allocation size. 00174 enum 00175 { 00176 eDefaultVectorSize = 5 00177 }; 00178 00179 AttributeVectorEntry* 00180 getNewEntry( 00181 const XMLCh* name, 00182 const XMLCh* type, 00183 const XMLCh* value); 00184 00185 // Helper function to delete entries... 00186 static void 00187 deleteEntries(AttributeVectorType& theVector); 00188 00189 AttributeVectorType m_AttributeVector; 00190 00191 AttributeVectorType m_cacheVector; 00192 }; 00193 00194 00195 00196 XALAN_CPP_NAMESPACE_END 00197 00198 00199 00200 #endif // ATTRIBUTELISTIMPL_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.