> -----Original Message----- > From: Berin Loritsch [mailto:[EMAIL PROTECTED] > Sent: den 17 december 2001 19:16 > To: Avalon Developers List > Subject: Re: [Review] Event Queues > > > Leo Sutic wrote: > Leo, can you please hand wrap your paragraphs?
Berin, will do. > Ok, now with the actual problem at hand. The typesafe interface > would be handy, but I have to wonder *how* to practically use it. > The issue is that I want the same feel for both C++ > as well as Java if that is how you are working with it. > I want to stay away from strings being the signal type, and if > possible, the class type > being the signal type. if (a instanceof A) <--------> if (dynamic_cast<A> (a) != NULL) Java C++ There are ways to solve this, with a switch/case construct. But I want to get rid of the construct. Ideally, one would introduce a layer in front of the Sink, and one after the Source, and by magic be able to write code like this: class MyStage extends AbstractStageWrapper { public void handleConnectionOpen (ConnectionOpenEvent event) { ... } public void handleConnectionClosed (ConnectionClosedEvent event) { ... } } Which, as I think about reflection, one actually can. Does anyone know the performance penalty for dynamic invocation of methods, as related to the expected time to run a typical SEDA event handler? I just want to get rid of that cursed switch/nested if! In C++ I think I could do it with some macros. Summary: As far as the Queue interfaces go, go for it. I don't think you can get them any better without trying to use them. They have no apparent faults. Just trying to wrap my head around the SEDA stuff and how to best express the architecture in Java/C++. I want as direct a mapping between the language and the concepts as possible, and I do not think the current implementation of SEDA is that. /LS -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>