1 // Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
4 #include "child_iterator.hpp"
8 #include "xpcom_support.hpp"
10 using xpcom_support::check;
12 child_iterator::child_iterator()
16 child_iterator::child_iterator(nsIDOMNode * node)
18 check(node->GetFirstChild(&node_));
21 child_iterator::~child_iterator()
27 already_AddRefed<nsIDOMNode> child_iterator::operator*() const
34 child_iterator & child_iterator::operator++()
37 check(node_->GetNextSibling(&next));
43 bool child_iterator::operator==(const child_iterator & other) const
45 return node_ == other.node_;