00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680) 00019 #define ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 #include <xalanc/PlatformSupport/DOMStringHelper.hpp> 00026 00027 00028 00029 #include <xalanc/Include/XalanVector.hpp> 00030 00031 #include <xalanc/Include/XalanMemMgrAutoPtr.hpp> 00032 00033 00034 XALAN_CPP_NAMESPACE_BEGIN 00035 00036 00037 00038 class XALAN_PLATFORMSUPPORT_EXPORT AttributeVectorEntry 00039 { 00040 public: 00041 00042 typedef XalanVector<XMLCh> XMLChVectorType; 00043 00044 AttributeVectorEntry( 00045 const XMLChVectorType& theName, 00046 const XMLChVectorType& theValue, 00047 const XMLChVectorType& theType, 00048 MemoryManager& theManager) : 00049 m_Name(theName,theManager), 00050 m_Value(theValue,theManager), 00051 m_Type(theType,theManager) 00052 { 00053 } 00054 00055 AttributeVectorEntry( 00056 const XMLCh* theName, 00057 const XMLCh* theValue, 00058 const XMLCh* theType, 00059 MemoryManager& theManager) : 00060 m_Name(theName, theName + length(theName) + 1, theManager), 00061 m_Value(theValue, theValue + length(theValue) + 1, theManager), 00062 m_Type(theType, theType + length(theType) + 1, theManager) 00063 { 00064 } 00065 00066 AttributeVectorEntry(MemoryManager& theManager) : 00067 m_Name(theManager), 00068 m_Value(theManager), 00069 m_Type(theManager) 00070 { 00071 } 00072 00073 static AttributeVectorEntry* 00074 create( 00075 const XMLCh* theName, 00076 const XMLCh* theValue, 00077 const XMLCh* theType, 00078 MemoryManager& theManager) 00079 { 00080 AttributeVectorEntry* theInstance; 00081 00082 return XalanConstruct( 00083 theManager, 00084 theInstance, 00085 theName, 00086 theValue, 00087 theType, 00088 theManager); 00089 } 00090 00091 virtual 00092 ~AttributeVectorEntry() 00093 { 00094 } 00095 00096 void 00097 clear() 00098 { 00099 m_Name.clear(); 00100 m_Value.clear(); 00101 m_Type.clear(); 00102 } 00103 00104 XMLChVectorType m_Name; 00105 XMLChVectorType m_Value; 00106 XMLChVectorType m_Type; 00107 00108 // A convenience function to find the length of a null-terminated 00109 // array of XMLChs 00110 static const XMLCh* 00111 endArray(const XMLCh* data) 00112 { 00113 assert(data != 0); 00114 00115 while(*data) 00116 { 00117 ++data; 00118 } 00119 00120 return data; 00121 } 00122 }; 00123 00124 00125 00126 XALAN_CPP_NAMESPACE_END 00127 00128 00129 00130 #endif // ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|