1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef XMLENGNODESET_H
25 #define XMLENGNODESET_H
27 #include <xml/dom/xmlengnode.h>
30 This class implements the node set container, which is one of the result type
35 friend class TXmlEngXPathEvaluator;
36 friend class RXmlEngXPathResult;
37 friend class RXmlEngXPathExpression;
40 /** Default constructor */
41 IMPORT_C RXmlEngNodeSet();
44 Frees any allocated resources.
46 As a node set only refers to existing nodes in the DOM tree, no nodes are
47 freed. However, namespace declarations are copied into the node set and
48 these copies are indeed freed.
52 /** Closes the node set. This simply calls Free(). */
56 Initializes the node set to an empty state.
60 This method is used when preparing node sets that will be used with
61 RXmlEngXPathExpression::EvaluateWithDependenciesL(TXmlEngNode,RXmlEngNodeSet&)
63 TXmlEngXPathEvaluator::EvaluateWithDependenciesL(aExpression,aContextNode,aResolver,aDependents).
65 @leave KErrNoMemory Memory allocation failure
66 @leave - Otherwise, any of the system wide errors.
68 IMPORT_C void InitializeL();
71 Gets the size of the node set
72 @return The number of nodes
74 IMPORT_C TInt Length() const;
77 Checks whether a node is in the node set.
79 @param aNode The node to check
80 @return ETrue if the node is in the node set, EFalse otherwise
82 IMPORT_C TBool Contains(TXmlEngNode aNode) const;
85 Retrieves a node from the node set by index
87 @param aIndex Node index ( 0 <= aIndex < Length() )
89 @leave KXmlEngErrWrongUseOfAPI aIndex is less than 0 or greater than
90 Length(), in debug builds only.
91 @leave - Otherwise, any of the system wide errors.
93 IMPORT_C TXmlEngNode operator[](TInt aIndex) const;
98 @param aData Internal data pointer
100 RXmlEngNodeSet(void* aData);
107 #include <xml/dom/xmlengnodeset.inl>
109 #endif /* XMLENGNODESET_H */