Xerces-C++: DOMXPathResult.hpp Source File

Xerces-C++ 3.3.0

DOMXPathResult.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMXPATHRESULT_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMXPATHRESULT_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26
27 XERCES_CPP_NAMESPACE_BEGIN
28
29class DOMXPathNSResolver;
30class DOMXPathExpression;
31class DOMTypeInfo;
32class DOMNode;
33
46 class CDOM_EXPORT DOMXPathResult
47{
48
49protected:
50 // -----------------------------------------------------------------------
51 // Hidden constructors
52 // -----------------------------------------------------------------------
55 DOMXPathResult() {};
57
58private:
59 // -----------------------------------------------------------------------
60 // Unimplemented constructors and operators
61 // -----------------------------------------------------------------------
64 DOMXPathResult(const DOMXPathResult &);
65 DOMXPathResult& operator = (const DOMXPathResult&);
67
68public:
69 // -----------------------------------------------------------------------
70 // All constructors are hidden, just the destructor is available
71 // -----------------------------------------------------------------------
78 virtual ~DOMXPathResult() {};
80
81 // -----------------------------------------------------------------------
82 // Class Types
83 // -----------------------------------------------------------------------
163 enum ResultType {
164 /* XPath 1.0 */
165 ANY_TYPE = 0,
166 NUMBER_TYPE = 1,
167 STRING_TYPE = 2,
168 BOOLEAN_TYPE = 3,
169 UNORDERED_NODE_ITERATOR_TYPE = 4,
170 ORDERED_NODE_ITERATOR_TYPE = 5,
171 UNORDERED_NODE_SNAPSHOT_TYPE = 6,
172 ORDERED_NODE_SNAPSHOT_TYPE = 7,
173 ANY_UNORDERED_NODE_TYPE = 8,
174 FIRST_ORDERED_NODE_TYPE = 9,
175 /* XPath 2.0 */
176 FIRST_RESULT_TYPE = 100,
177 ITERATOR_RESULT_TYPE = 101,
178 SNAPSHOT_RESULT_TYPE = 102
179 };
181
182
183 // -----------------------------------------------------------------------
184 // Virtual DOMXPathResult interface
185 // -----------------------------------------------------------------------
188
194 virtual ResultType getResultType() const = 0;
195
201 virtual const DOMTypeInfo *getTypeInfo() const = 0;
202
210 virtual bool isNode() const = 0;
211
222 virtual bool getBooleanValue() const = 0;
223
234 virtual int getIntegerValue() const = 0;
235
249 virtual double getNumberValue() const = 0;
250
261 virtual const XMLCh* getStringValue() const = 0;
262
277 virtual DOMNode* getNodeValue() const = 0;
278
291 virtual bool iterateNext() = 0;
292
304 virtual bool getInvalidIteratorState() const = 0;
305
319 virtual bool snapshotItem(XMLSize_t index) = 0;
320
330 virtual XMLSize_t getSnapshotLength() const = 0;
331
333
334 // -----------------------------------------------------------------------
335 // Non-standard Extension
336 // -----------------------------------------------------------------------
345 virtual void release() = 0;
347};
348
349 XERCES_CPP_NAMESPACE_END
350
351#endif
XercesDefs.hpp
CDOM_EXPORT
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition DOMNode.hpp:139
DOMTypeInfo
The DOMTypeInfo interface represent a type used by DOMElement or DOMAttr nodes, specified in the sche...
Definition DOMTypeInfo.hpp:36
DOMXPathExpression
The DOMXPathExpression interface represents a parsed and resolved XPath expression.
Definition DOMXPathExpression.hpp:37
DOMXPathNSResolver
The DOMXPathNSResolver interface permit prefix strings in the expression to be properly bound to name...
Definition DOMXPathNSResolver.hpp:37
DOMXPathResult
The DOMXPathResult interface represents the result of the evaluation of an XPath 1....
Definition DOMXPathResult.hpp:47
DOMXPathResult::getTypeInfo
virtual const DOMTypeInfo * getTypeInfo() const =0
Returns the DOM type info of the current result node or value (XPath 2 only).
DOMXPathResult::getNumberValue
virtual double getNumberValue() const =0
Returns the number value of this result.
DOMXPathResult::getSnapshotLength
virtual XMLSize_t getSnapshotLength() const =0
The number of items in the result snapshot.
DOMXPathResult::getStringValue
virtual const XMLCh * getStringValue() const =0
Returns the string value of this result.
DOMXPathResult::release
virtual void release()=0
Called to indicate that this DOMXPathResult is no longer in use and that the implementation may relin...
DOMXPathResult::getInvalidIteratorState
virtual bool getInvalidIteratorState() const =0
Signifies that the iterator has become invalid.
DOMXPathResult::iterateNext
virtual bool iterateNext()=0
Iterates and returns true if the current result is the next item from the sequence or false if there ...
DOMXPathResult::getResultType
virtual ResultType getResultType() const =0
Returns the result type of this result.
DOMXPathResult::getNodeValue
virtual DOMNode * getNodeValue() const =0
Returns the node value of this result.
DOMXPathResult::DOMXPathResult
DOMXPathResult()
Definition DOMXPathResult.hpp:55
DOMXPathResult::ResultType
ResultType
Definition DOMXPathResult.hpp:163
DOMXPathResult::isNode
virtual bool isNode() const =0
Returns true if the result has a current result and the value is a node (XPath 2 only).
DOMXPathResult::getBooleanValue
virtual bool getBooleanValue() const =0
Returns the boolean value of this result.
DOMXPathResult::~DOMXPathResult
virtual ~DOMXPathResult()
Destructor.
Definition DOMXPathResult.hpp:78
DOMXPathResult::snapshotItem
virtual bool snapshotItem(XMLSize_t index)=0
Sets the current result to the indexth item in the snapshot collection.
DOMXPathResult::getIntegerValue
virtual int getIntegerValue() const =0
Returns the integer value of this result (XPath 2 only).