1 // Copyright (c) 2006-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 XMLENGNODELIST_H
25 #define XMLENGNODELIST_H
27 #include <xml/dom/xmlengnode.h>
28 #include <xml/dom/xmlengnodelist_impl.h>
31 Implements an iterator or filtered iterator for a tree.
33 This classes behaves in two very different ways, depending on the
36 1) RXmlEngNodeList<TXmlEngNode>
38 Through template specialization, this becomes an alias for RXmlEngNodeListImpl.
39 The RXmlEngNodeListImpl::OpenL() methods control which nodes are included in
40 the iterator. It is possible to iterate across all node types or only a single
41 type. It is possible to iterate only over nodes within a specific namespace.
42 It is also possible to iterate over nodes with the same name.
44 RXmlEngNodeListImpl should not be used directly.
46 @see RXmlEngNodeListImpl
48 2) RXmlEngNodeList<X> where X is not TXmlEngNode
50 As the OpenL() methods of this class are private, this class cannot be opened
51 except by friend classes TXmlEngNode and TXmlEngElement. As such, this form
57 friend class TXmlEngNode;
58 friend class TXmlEngElement;
63 @return The number of nodes in the list
65 inline TInt Count() const;
68 Checks whether a next node exists in the list
69 @return ETrue of a next node exists, EFalse otherwise
71 inline TBool HasNext() const;
74 Gets the next node in the list
75 @return The next node casted to the templated type or NULL if it does not
81 Closes a node list. This does not affect any of the nodes. Only
82 internally used memory is freed.
90 TXmlEngNode::TXmlEngDOMNodeType aType,
91 const TDesC8& aName = KNullDesC8,
92 const TDesC8& aNs = KNullDesC8);
96 TXmlEngNode::TXmlEngDOMNodeType aType);
99 RXmlEngNodeListImpl iList;
103 This template specialization makes RXmlEngNodeList<TXmlEngNode> an alias for
104 RXmlEngNodeListImpl. No part of the class specified above is used, rather the
105 interface (and implementation) of RXmlEngNodeListImpl is used instead.
108 class RXmlEngNodeList<TXmlEngNode>: public RXmlEngNodeListImpl {};
111 #include <xml/dom/xmlengnodelist.inl>
113 #endif /* XMLENGNODELIST_H */