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