1 // Copyright 2005 Ben Hutchings <ben@decadentplace.org.uk>.
2 // See the file "COPYING" for licence details.
4 #ifndef INC_LINKITERATOR_HPP
5 #define INC_LINKITERATOR_HPP
10 #include <nsIDOMHTMLCollection.h>
11 #include <nsIDOMNode.h>
16 : public std::iterator<std::input_iterator_tag, nsCOMPtr<nsIDOMNode>,
21 explicit LinkIterator(nsIDOMDocument * document);
23 already_AddRefed<nsIDOMNode> operator*() const;
24 LinkIterator & operator++();
25 bool operator==(const LinkIterator &) const;
26 bool operator!=(const LinkIterator & other) const
28 return !(*this == other);
32 nsCOMPtr<nsIDOMHTMLCollection> collection_;
33 unsigned int index_, length_;
36 #endif // !INC_LINKITERATOR_HPP