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 00019 #if !defined(XALAN_NODESORTKEY_HEADER_GUARD) 00020 #define XALAN_NODESORTKEY_HEADER_GUARD 00021 00022 // Base include file. Must be first. 00023 #include "XSLTDefinitions.hpp" 00024 00025 00026 00027 // $$$ ToDo: This is necessary while XalanDOMString is a typedef. 00028 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00029 00030 00031 00032 #include <xalanc/PlatformSupport/XalanCollationServices.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 class ExecutionContext; 00041 class PrefixResolver; 00042 class XPath; 00043 00044 00045 00046 /** 00047 * Simple data structure class for use by the NodeSorter class. 00048 */ 00049 class XALAN_XSLT_EXPORT NodeSortKey 00050 { 00051 public: 00052 00053 /** 00054 * Construct a node sort key. 00055 * 00056 * @param executionContext current execution context 00057 * @param selectPat XPath for selection 00058 * @param treatAsNumbers treat as numeric values if true 00059 * @param descending sort in descending order if true 00060 * @param caseOrder case sort order enum 00061 * @param langValue language 00062 * @param resolver resolver for namespace resolution 00063 */ 00064 NodeSortKey( 00065 ExecutionContext& executionContext, 00066 const XPath* selectPat, 00067 bool treatAsNumbers, 00068 bool descending, 00069 XalanCollationServices::eCaseOrder caseOrder, 00070 const XalanDOMString& langValue, 00071 const PrefixResolver& resolver); 00072 00073 NodeSortKey(); 00074 00075 NodeSortKey(const NodeSortKey& theSource); 00076 00077 ~NodeSortKey(); 00078 00079 NodeSortKey& 00080 operator=(const NodeSortKey& theRHS); 00081 00082 /** 00083 * Retrieve the selection XPath. 00084 * 00085 * @return XPath for selection 00086 */ 00087 const XPath* 00088 getSelectPattern() const 00089 { 00090 return m_selectPat; 00091 } 00092 00093 /** 00094 * Whether to treat values as numbers. 00095 * 00096 * @return treat as numeric values if true 00097 */ 00098 bool 00099 getTreatAsNumbers() const 00100 { 00101 return m_treatAsNumbers; 00102 } 00103 00104 /** 00105 * Whether to sort in descending order. 00106 * 00107 * @return sort in descending order if true 00108 */ 00109 bool 00110 getDescending() const 00111 { 00112 return m_descending; 00113 } 00114 00115 /** 00116 * Get the enumeration value for the case order. 00117 * 00118 * @return sort upper case before lower case if true 00119 */ 00120 XalanCollationServices::eCaseOrder 00121 getCaseOrder() const 00122 { 00123 return m_caseOrder; 00124 } 00125 00126 /** 00127 * Retrieve the resolver for namespaces. 00128 * 00129 * @return object for namespace resolution 00130 */ 00131 const PrefixResolver* 00132 getPrefixResolver() const 00133 { 00134 return m_prefixResolver; 00135 } 00136 00137 const XalanDOMString& 00138 getLanguageString() const 00139 { 00140 return *m_languageString; 00141 } 00142 00143 private: 00144 00145 ExecutionContext* m_executionContext; // needed for error reporting. 00146 00147 const XPath* m_selectPat; 00148 00149 bool m_treatAsNumbers; 00150 bool m_descending; 00151 00152 XalanCollationServices::eCaseOrder m_caseOrder; 00153 00154 const PrefixResolver* m_prefixResolver; 00155 00156 const XalanDOMString* m_languageString; 00157 }; 00158 00159 00160 00161 XALAN_CPP_NAMESPACE_END 00162 00163 00164 00165 #endif
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|