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_MATCHPATTERNDATA_HEADER_GUARD) 00020 #define XALAN_MATCHPATTERNDATA_HEADER_GUARD 00021 00022 00023 00024 // Base include file. Must be first. 00025 #include "xalanc/XSLT/XSLTDefinitions.hpp" 00026 00027 00028 00029 #include <cstddef> 00030 00031 00032 00033 #include "xalanc/XalanDOM/XalanDOMString.hpp" 00034 00035 00036 00037 #include "xalanc/XPath/XPath.hpp" 00038 00039 00040 00041 XALAN_CPP_NAMESPACE_BEGIN 00042 00043 00044 class ElemTemplate; 00045 00046 00047 00048 /** 00049 * This class contains information concerning a match pattern in 00050 * a stylesheet. 00051 */ 00052 class XALAN_XSLT_EXPORT XalanMatchPatternData 00053 { 00054 00055 public: 00056 00057 typedef XPath::eMatchScore eMatchScore; 00058 00059 #if defined(XALAN_STRICT_ANSI_HEADERS) 00060 typedef std::size_t size_type; 00061 #else 00062 typedef size_t size_type; 00063 #endif 00064 00065 00066 /** 00067 * Construct a XalanMatchPatternData from a pattern and template. 00068 * 00069 * @param theTemplate The ElemTemplate node that contains the template for this pattern 00070 * @param thePosition The position in the stylesheet 00071 * @param theTargetString The target string for match pattern 00072 * @param TheMatchPattern The match pattern 00073 * @param thePatternString the pattern string 00074 * @param thePriority The priority for the match pattern. 00075 */ 00076 XalanMatchPatternData( 00077 MemoryManager& theManager, 00078 const ElemTemplate& theTemplate, 00079 size_type thePosition, 00080 const XalanDOMString& theTargetString, 00081 const XPath& theMatchPattern, 00082 const XalanDOMString& thePatternString, 00083 eMatchScore thePriority) : 00084 m_template(&theTemplate), 00085 m_position(thePosition), 00086 m_targetString(theTargetString, theManager), 00087 m_matchPattern(&theMatchPattern), 00088 m_pattern(&thePatternString), 00089 m_priority(thePriority) 00090 { 00091 } 00092 00093 ~XalanMatchPatternData() 00094 { 00095 } 00096 00097 /** 00098 * Retrieve string for target. 00099 * 00100 * @return target string 00101 */ 00102 const XalanDOMString& 00103 getTargetString() const 00104 { 00105 return m_targetString; 00106 } 00107 00108 /** 00109 * Retrieve the match pattern associated with pattern. 00110 * 00111 * @return XPath for pattern 00112 */ 00113 const XPath* 00114 getExpression() const 00115 { 00116 return m_matchPattern; 00117 } 00118 00119 /** 00120 * Retrieve position of pattern in stylesheet. 00121 * 00122 * @return The position in the stylesheet 00123 */ 00124 size_type 00125 getPosition() const 00126 { 00127 return m_position; 00128 } 00129 00130 /** 00131 * Retrieve pattern string. 00132 * 00133 * @return string that contains element pattern 00134 */ 00135 const XalanDOMString* 00136 getPattern() const 00137 { 00138 return m_pattern; 00139 } 00140 00141 /** 00142 * Retrieve node that contains the template for this pattern. 00143 * 00144 * @return template node 00145 */ 00146 const ElemTemplate* 00147 getTemplate() const 00148 { 00149 return m_template; 00150 } 00151 00152 eMatchScore 00153 getDefaultPriority() const 00154 { 00155 return m_priority; 00156 } 00157 00158 double 00159 getPriorityOrDefault() const; 00160 00161 private: 00162 // not implemented 00163 XalanMatchPatternData(); 00164 XalanMatchPatternData( const XalanMatchPatternData&); 00165 00166 const ElemTemplate* m_template; 00167 00168 size_type m_position; 00169 00170 XalanDOMString m_targetString; 00171 00172 const XPath* m_matchPattern; 00173 00174 const XalanDOMString* m_pattern; 00175 00176 eMatchScore m_priority; 00177 }; 00178 00179 00180 00181 XALAN_CPP_NAMESPACE_END 00182 00183 00184 00185 #endif // XALAN_MATCHPATTERNDATA_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|