Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanMatchPatternData.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #if !defined(XALAN_MATCHPATTERNDATA_HEADER_GUARD)
20 #define XALAN_MATCHPATTERNDATA_HEADER_GUARD
21 
22 
23 
24 // Base include file. Must be first.
26 
27 
28 
29 #include <cstddef>
30 
31 
32 
34 
35 
36 
37 #include "xalanc/XPath/XPath.hpp"
38 
39 
40 
41 XALAN_CPP_NAMESPACE_BEGIN
42 
43 
44 class ElemTemplate;
45 
46 
47 
48 /**
49  * This class contains information concerning a match pattern in
50  * a stylesheet.
51  */
53 {
54 
55 public:
56 
58 
59 #if defined(XALAN_STRICT_ANSI_HEADERS)
60  typedef std::size_t size_type;
61 #else
62  typedef size_t size_type;
63 #endif
64 
65 
66  /**
67  * Construct a XalanMatchPatternData from a pattern and template.
68  *
69  * @param theTemplate The ElemTemplate node that contains the template for this pattern
70  * @param thePosition The position in the stylesheet
71  * @param theTargetString The target string for match pattern
72  * @param TheMatchPattern The match pattern
73  * @param thePatternString the pattern string
74  * @param thePriority The priority for the match pattern.
75  */
77  MemoryManager& theManager,
78  const ElemTemplate& theTemplate,
79  size_type thePosition,
80  const XalanDOMString& theTargetString,
81  const XPath& theMatchPattern,
82  const XalanDOMString& thePatternString,
83  eMatchScore thePriority) :
84  m_template(&theTemplate),
85  m_position(thePosition),
86  m_targetString(theTargetString, theManager),
87  m_matchPattern(&theMatchPattern),
88  m_pattern(&thePatternString),
89  m_priority(thePriority)
90  {
91  }
92 
94  {
95  }
96 
97  /**
98  * Retrieve string for target.
99  *
100  * @return target string
101  */
102  const XalanDOMString&
104  {
105  return m_targetString;
106  }
107 
108  /**
109  * Retrieve the match pattern associated with pattern.
110  *
111  * @return XPath for pattern
112  */
113  const XPath*
115  {
116  return m_matchPattern;
117  }
118 
119  /**
120  * Retrieve position of pattern in stylesheet.
121  *
122  * @return The position in the stylesheet
123  */
124  size_type
125  getPosition() const
126  {
127  return m_position;
128  }
129 
130  /**
131  * Retrieve pattern string.
132  *
133  * @return string that contains element pattern
134  */
135  const XalanDOMString*
136  getPattern() const
137  {
138  return m_pattern;
139  }
140 
141  /**
142  * Retrieve node that contains the template for this pattern.
143  *
144  * @return template node
145  */
146  const ElemTemplate*
147  getTemplate() const
148  {
149  return m_template;
150  }
151 
152  eMatchScore
154  {
155  return m_priority;
156  }
157 
158  double
159  getPriorityOrDefault() const;
160 
161 private:
162  // not implemented
165 
166  const ElemTemplate* m_template;
167 
168  size_type m_position;
169 
170  XalanDOMString m_targetString;
171 
172  const XPath* m_matchPattern;
173 
174  const XalanDOMString* m_pattern;
175 
176  eMatchScore m_priority;
177 };
178 
179 
180 
181 XALAN_CPP_NAMESPACE_END
182 
183 
184 
185 #endif // XALAN_MATCHPATTERNDATA_HEADER_GUARD
const ElemTemplate * getTemplate() const
Retrieve node that contains the template for this pattern.
This class contains information concerning a match pattern in a stylesheet.
eMatchScore
Definition: XPath.hpp:86
const XalanDOMString & getTargetString() const
Retrieve string for target.
Definition: XPath.hpp:64
XalanMatchPatternData(MemoryManager &theManager, const ElemTemplate &theTemplate, size_type thePosition, const XalanDOMString &theTargetString, const XPath &theMatchPattern, const XalanDOMString &thePatternString, eMatchScore thePriority)
Construct a XalanMatchPatternData from a pattern and template.
XPath::eMatchScore eMatchScore
const XPath * getExpression() const
Retrieve the match pattern associated with pattern.
eMatchScore getDefaultPriority() const
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:46
const XalanDOMString * getPattern() const
Retrieve pattern string.
size_type getPosition() const
Retrieve position of pattern in stylesheet.
#define XALAN_XSLT_EXPORT

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.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo