Re: multiple callbacks

"Franck Arnaud" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Raf Haesen:
 
> This works fine but at the same time I want to add another callback 
[...]
> How can I add another tagcount callback that inherits from 
> XM_CALLBACK_NUL?

Just inherit from XM_CALLBACKS_FILTER instead, call Precursor 
in the routines you redefine, and insert your filter in the 
pipe:
 
 create {XM_EIFFEL_PARSER} event_parser.make
 create {XM_TREE_CALLBACKS_PIPE}tree_pipe.make
 create {YOUR_CALLBACKS_FILTER} a_filter.set_next (tree_pipe.start)
 event_parser.set_callbacks (a_filter)

See XM_EVENT_COUNT_FILTER's source to see an example of a 
simple filter.

We could also have a Y-connector event filter that takes one 
input and has 2 outputs, but I think in your particular case 
a simple in-line filter is as good. I'll think about adding 
a dispatcher filter though (maybe with a list of output filters 
rather than fixed to 2).



To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.