Re: [libxml++] node iterators
- From: Christophe de VIENNE <cdevienne alphacent com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] node iterators
- Date: Fri, 7 Feb 2003 19:08:44 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Vendredi 7 Février 2003 19:01, Stefan Seefeld a écrit :
> Jonathan Wakely wrote:
> > I'm now thinking that ForwardContainer migh be a better choice of STL
> > concept to model, as it has fewer requirements so might be simpler to
> > implement 1) while still supporting an STL-style interface. This would
> > mean you can get an iterator from any Node, not just from some container
> > type.
>
> agreed. In fact, the more I think about suggestion 2) the more I like
> it: the 'Node' class has a 'get_children()' and a 'get_attribute()'
> method returning both a NodeList. So far it's almost as it was.
> However, instead of typedefing NodeList to be 'std::list<Node *>',
> I'd suggest we define it such that creation of a NodeList only implies
> a single copy: that of the first child node / attribute of the given
> node. The iterator is then implemented to traverse the libxml2 linked
> list, not the STL container as it did before.
>
> Does this sound satisfactory to everybody ?
>
Yes.
We can already revert current iterators implementation on main branch.
Then I'd like to see this as a patch before commiting something. For now I
consider this more like a proposition (very interesting one though).
Regards,
Christophe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Q/YsB+sU3TyOQjARArcYAJ9uGL9K5SHYQUsVlfm5kWQoTeVa1QCePo6V
taCm/GXsYut9cPJfjphGdcw=
=be21
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]