Xalan-C++ API Reference  1.12.0
SelectionEvent.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 #if !defined(XALAN_SelectionEvent_HEADER_GUARD)
19 #define XALAN_SelectionEvent_HEADER_GUARD
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
29 
30 
31 
32 #include <xalanc/XPath/XObject.hpp>
33 
34 
35 
36 namespace XALAN_CPP_NAMESPACE {
37 
38 
39 
40 class XalanNode;
41 class ElemTemplateElement;
42 class StylesheetExecutionContext;
43 class XPath;
44 
45 
46 
48 {
49 public:
50 
51  /**
52  * Create an event originating at the given node of the style tree.
53  *
54  * @param executionContext The current execution context
55  * @param sourceNode The source node selected.
56  * @param styleNode The node in the style tree reference for the event
57  * @param attributeName The attribute name where the XPath expression was supplied
58  * @param xpath The XPath instance executed
59  * @param selection The result of evaluating the XPath
60  *
61  */
63  StylesheetExecutionContext& executionContext,
64  const XalanNode* sourceNode,
65  const ElemTemplateElement& styleNode,
66  const XalanDOMString& attributeName,
67  const XPath& xpath,
68  const XObjectPtr selection);
69 
70  /**
71  * Create an event originating at the given node of the style tree.
72  *
73  * @param executionContext The current execution context
74  * @param sourceNode The source node selected.
75  * @param styleNode The node in the style tree reference for the event
76  * @param attributeName The attribute name where the XPath expression was supplied
77  * @param xpathExpression The XPath expression executed
78  * @param selection The result of evaluating the XPath
79  *
80  */
82  StylesheetExecutionContext& executionContext,
83  const XalanNode* sourceNode,
84  const ElemTemplateElement& styleNode,
85  const XalanDOMString& attributeName,
86  const XalanDOMString& xpathExpression,
87  const XObjectPtr selection);
88 
89  /**
90  * Create an event originating at the given node of the style tree.
91  *
92  * @param executionContext The current execution context
93  * @param sourceNode The source node selected.
94  * @param styleNode The node in the style tree reference for the event
95  * @param attributeName The attribute name where the XPath expression was supplied
96  * @param xpath The XPath instance executed
97  * @param selection The result of evaluating the XPath
98  *
99  */
101  StylesheetExecutionContext& executionContext,
102  const XalanNode* sourceNode,
103  const ElemTemplateElement& styleNode,
104  const XalanDOMString& attributeName,
105  const XPath& xpath,
106  bool selection);
107 
108  /**
109  * Create an event originating at the given node of the style tree.
110  *
111  * @param executionContext The current execution context
112  * @param sourceNode The source node selected.
113  * @param styleNode The node in the style tree reference for the event
114  * @param attributeName The attribute name where the XPath expression was supplied
115  * @param xpath The XPath instance executed
116  * @param selection The result of evaluating the XPath
117  *
118  */
120  StylesheetExecutionContext& executionContext,
121  const XalanNode* sourceNode,
122  const ElemTemplateElement& styleNode,
123  const XalanDOMString& attributeName,
124  const XPath& xpath,
125  const NodeRefListBase& selection);
126 
127  virtual
128  ~SelectionEvent();
129 
130  enum eSelectionType { eNone, eBoolean, eNodeSet, eUnknown };
131 
132  /**
133  * The executionContext instance.
134  */
136 
137  /**
138  * The current context node.
139  */
141 
142  /**
143  * The node in the style tree where the event occurs.
144  */
146 
147  /**
148  * The attribute name from which the selection is made.
149  */
151 
152  /**
153  * The XPath expression evaluated.
154  */
156 
157  /**
158  * The result of the selection. If it's null, m_sourceNode
159  * was selected, or some specific type was selected. See
160  * the above enums.
161  */
163 
164  /**
165  * The type of the selection.
166  */
168 
169  bool m_boolean;
170 
172 
173 private:
174 
175  // Unimplemented...
177  operator=(const SelectionEvent& other);
178 };
179 
180 
181 
182 }
183 
184 
185 
186 #endif //XALAN_SelectionEvent_HEADER_GUARD
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::StylesheetExecutionContext
Definition: StylesheetExecutionContext.hpp:106
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::SelectionEvent::m_boolean
bool m_boolean
Definition: SelectionEvent.hpp:169
XalanDOMString.hpp
xalanc::XPath
Definition: XPath.hpp:67
xalanc::SelectionEvent::m_executionContext
const StylesheetExecutionContext & m_executionContext
The executionContext instance.
Definition: SelectionEvent.hpp:135
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
xalanc::SelectionEvent::m_nodeList
const NodeRefListBase *const m_nodeList
Definition: SelectionEvent.hpp:171
xalanc::ElemTemplateElement
Definition: ElemTemplateElement.hpp:79
xalanc::SelectionEvent::m_styleNode
const ElemTemplateElement & m_styleNode
The node in the style tree where the event occurs.
Definition: SelectionEvent.hpp:145
xalanc::XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
xalanc::SelectionEvent::eSelectionType
eSelectionType
Definition: SelectionEvent.hpp:130
xalanc::SelectionEvent
Definition: SelectionEvent.hpp:47
xalanc::SelectionEvent::m_attributeName
const XalanDOMString & m_attributeName
The attribute name from which the selection is made.
Definition: SelectionEvent.hpp:150
xalanc::SelectionEvent::m_sourceNode
const XalanNode * m_sourceNode
The current context node.
Definition: SelectionEvent.hpp:140
XSLTDefinitions.hpp
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:44
xalanc::SelectionEvent::m_xpathExpression
const XalanDOMString & m_xpathExpression
The XPath expression evaluated.
Definition: SelectionEvent.hpp:155
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::SelectionEvent::m_selection
const XObjectPtr m_selection
The result of the selection.
Definition: SelectionEvent.hpp:162
xalanc::SelectionEvent::m_type
const eSelectionType m_type
The type of the selection.
Definition: SelectionEvent.hpp:167
XObject.hpp