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

NodeRefList.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(NODEREFLIST_HEADER_GUARD_1357924680) 00017 #define NODEREFLIST_HEADER_GUARD_1357924680 00018 00019 00020 00021 // Base include file. Must be first. 00022 #include <xalanc/XPath/XPathDefinitions.hpp> 00023 00024 00025 00026 #include <vector> 00027 00028 00029 00030 #include <xalanc/XPath/NodeRefListBase.hpp> 00031 00032 00033 00034 XALAN_CPP_NAMESPACE_BEGIN 00035 00036 00037 00041 class XALAN_XPATH_EXPORT NodeRefList : public NodeRefListBase 00042 { 00043 public: 00044 00045 explicit 00046 NodeRefList(); 00047 00053 NodeRefList(const NodeRefList& theSource); 00054 00060 explicit 00061 NodeRefList(const NodeRefListBase& theSource); 00062 00063 virtual 00064 ~NodeRefList(); 00065 00066 NodeRefList& 00067 operator=(const NodeRefListBase& theRHS); 00068 00069 NodeRefList& 00070 operator=(const NodeRefList& theRHS); 00071 00072 bool 00073 empty() const 00074 { 00075 return m_nodeList.empty(); 00076 } 00077 00078 00079 // These methods are inherited from NodeRefListBase ... 00080 00081 virtual XalanNode* 00082 item(size_type index) const; 00083 00084 virtual size_type 00085 getLength() const; 00086 00087 virtual size_type 00088 indexOf(const XalanNode* theNode) const; 00089 00090 #if !defined(NDEBUG) 00091 bool 00092 checkForDuplicates() const; 00093 #endif 00094 00095 #if defined(XALAN_NO_STD_NAMESPACE) 00096 typedef vector<XalanNode*> NodeListVectorType; 00097 #else 00098 typedef std::vector<XalanNode*> NodeListVectorType; 00099 #endif 00100 00101 void 00102 swap(NodeRefList& theOther) 00103 { 00104 m_nodeList.swap(theOther.m_nodeList); 00105 } 00106 00107 protected: 00108 00109 // Default vector allocation size. It seems high, but 00110 // it's really worth it... 00111 enum 00112 { 00113 eDefaultVectorSize = 100 00114 }; 00115 00123 void 00124 ensureAllocation(NodeListVectorType::size_type theSize = 0) 00125 { 00126 m_nodeList.reserve(eDefaultVectorSize > theSize ? eDefaultVectorSize : theSize); 00127 } 00128 00129 NodeListVectorType m_nodeList; 00130 }; 00131 00132 00133 00134 XALAN_CPP_NAMESPACE_END 00135 00136 00137 00138 #endif // NODEREFLIST_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.