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

KeyTable.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(XALAN_KEYTABLE_HEADER_GUARD) 00017 #define XALAN_KEYTABLE_HEADER_GUARD 00018 00028 // Base include file. Must be first. 00029 #include "XSLTDefinitions.hpp" 00030 00031 00032 00033 #if defined(XALAN_USE_HASH_MAP) 00034 #include <hash_map> 00035 #else 00036 #include <map> 00037 #endif 00038 #include <vector> 00039 00040 00041 00042 #include <xalanc/PlatformSupport/DOMStringHelper.hpp> 00043 00044 00045 00046 #include <xalanc/XPath/MutableNodeRefList.hpp> 00047 #include <xalanc/XPath/XalanQNameByReference.hpp> 00048 00049 00050 00051 XALAN_CPP_NAMESPACE_BEGIN 00052 00053 00054 00055 class KeyDeclaration; 00056 class NodeRefListBase; 00057 class PrefixResolver; 00058 class StylesheetExecutionContext; 00059 class XalanElement; 00060 class XalanDocument; 00061 class XalanNode; 00062 00063 00064 00065 00072 class KeyTable 00073 { 00074 public: 00075 00076 #if defined(XALAN_NO_STD_NAMESPACE) 00077 typedef vector<KeyDeclaration> KeyDeclarationVectorType; 00078 00079 typedef map<XalanDOMString, 00080 MutableNodeRefList, 00081 less<XalanDOMString> > NodeListMapType; 00082 00083 typedef map<XalanQNameByReference, 00084 NodeListMapType, 00085 less<XalanQNameByReference> > KeysMapType; 00086 #else 00087 typedef std::vector<KeyDeclaration> KeyDeclarationVectorType; 00088 00089 #if defined(XALAN_USE_HASH_MAP) 00090 typedef std::hash_map<XalanDOMString, 00091 MutableNodeRefList> NodeListMapType; 00092 00093 typedef std::hash_map<XalanQNameByReference, 00094 NodeListMapType> KeysMapType; 00095 #else 00096 typedef std::map<XalanDOMString, 00097 MutableNodeRefList> NodeListMapType; 00098 00099 typedef std::map<XalanQNameByReference, 00100 NodeListMapType> KeysMapType; 00101 #endif 00102 #endif 00103 00104 00114 KeyTable( 00115 XalanNode* startNode, 00116 const PrefixResolver& resolver, 00117 const KeyDeclarationVectorType& keyDeclarations, 00118 StylesheetExecutionContext& executionContext); 00119 00120 virtual 00121 ~KeyTable(); 00122 00135 const MutableNodeRefList& 00136 getNodeSetByKey( 00137 const XalanQName& qname, 00138 const XalanDOMString& ref) const; 00139 00140 private: 00141 00142 static void 00143 processKeyDeclaration( 00144 KeysMapType& theKeys, 00145 const KeyDeclaration& kd, 00146 XalanNode* testNode, 00147 const PrefixResolver& resolver, 00148 StylesheetExecutionContext& executionContext); 00149 00154 const XalanDocument* m_docKey; 00155 00168 KeysMapType m_keys; 00169 00170 static const MutableNodeRefList s_dummyList; 00171 }; 00172 00173 00174 00175 XALAN_CPP_NAMESPACE_END 00176 00177 00178 00179 #endif // XALAN_KEYTABLE_HEADER_GUARD

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.