Boost logo

Boost :

From: Janusz Piwowarski (jpiw_at_[hidden])
Date: 2005-11-05 15:38:29

Friday, November 4, 2005, 4:19:45 PM, Stefan Seefeld wrote:

>>>Assuming you are talking about the element class and its methods to add
>>>various child node types, I don't quite see how I could overload the
>>>function name 'append' and 'insert', as most versions have the same
>>>signature. E.g. 'insert_element("foo")' will add (and return) the
>>>element <foo/>
>> node.insert( element( "foo" ));
>>>while 'insert_comment("foo")' will add (and return) the comment
>> node.insert( comment( "foo" ));

> That assumes you can create a freestanding 'element' and 'comment' object,
> which I deliberately try to avoid, as it would necessitate the API to become
> more complex.

I disagree - you have classes for different node types, but you don't
use it for creating their instances.


Boost list run by bdawes at, gregod at, cpdaniel at, john at