Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: >> I have begun on a road that I am not sure that I should continue. >> It is nice in a way... but I have feeling that it is complicated... >> OTOH the handlers are quite easy to write, since you only follow the >> DTD when doing so. >> >> I am now so far that I can with little effort parse a document - header >> only. >> >> Have a look at these, and comment please: > | Ok, had a look. This is not as I envisaged it. I pictured something like: > | class Element { | boost::signal<> start; | boost::signal<> body; | boost::signal<> end; | }; > | and that each Element instance (header, param, preamble, options in this | case) would connect separate functions to these signals. Not this huge | switch statement.
So you run umph-teen signal handlers on each element? Or to you think like storing them in a map? The problem is sub-elements. <body><paragraph><font></font></paragraph></body> You have to show me an example of what you are thinking. | I certainly haven't thought it through, but it seems to me that avoiding | the switch is a major goal, no? Yes, but if the signals need to be set dynamically then you just loose... -- Lgb