1 // Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
4 #ifndef INC_LINK_ITERATOR_HPP
5 #define INC_LINK_ITERATOR_HPP
9 #include "wchar_t_short.h"
11 #include <nsIDOMHTMLCollection.h>
12 #include <nsIDOMNode.h>
13 #include "wchar_t_default.h"
18 : public std::iterator<std::input_iterator_tag, nsCOMPtr<nsIDOMNode>,
23 explicit link_iterator(nsIDOMDocument * document);
25 already_AddRefed<nsIDOMNode> operator*() const;
26 link_iterator & operator++();
27 bool operator==(const link_iterator &) const;
28 bool operator!=(const link_iterator & other) const
30 return !(*this == other);
34 nsCOMPtr<nsIDOMHTMLCollection> collection_;
35 unsigned int index_, length_;
38 #endif // !INC_LINK_ITERATOR_HPP