X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=link_iterator.hpp;fp=link_iterator.hpp;h=d2b7a1ac228a42e1889a06cb2bb9d96677e1e27d;hp=0000000000000000000000000000000000000000;hb=0acb5f1329d294faf42e247f8c2daf68d82150f6;hpb=1b6026c7baa122b99011f760857b80b7f253dfbb diff --git a/link_iterator.hpp b/link_iterator.hpp new file mode 100644 index 0000000..d2b7a1a --- /dev/null +++ b/link_iterator.hpp @@ -0,0 +1,36 @@ +// Copyright 2005 Ben Hutchings . +// See the file "COPYING" for licence details. + +#ifndef INC_LINK_ITERATOR_HPP +#define INC_LINK_ITERATOR_HPP + +#include + +#include +#include +#include + +class nsIDOMDocument; + +class link_iterator + : public std::iterator, + void, void, void> +{ +public: + link_iterator(); + explicit link_iterator(nsIDOMDocument * document); + + already_AddRefed operator*() const; + link_iterator & operator++(); + bool operator==(const link_iterator &) const; + bool operator!=(const link_iterator & other) const + { + return !(*this == other); + } + +private: + nsCOMPtr collection_; + unsigned int index_, length_; +}; + +#endif // !INC_LINK_ITERATOR_HPP