Boost logo

Boost Users :

From: Aaron W. LaFramboise (aaronrabiddog51_at_[hidden])
Date: 2004-10-21 17:45:47


Hugo Duncan wrote:

> On Thu, 21 Oct 2004 Aaron W. LaFramboise wrote:
>
>>I'd just like to point out that I intend to share a prototype design of
>>a demultiplexor.
>
> The interface that I have is now:
>
> template <typename Impl>
> class demux
> {
> template <typename Arguments>
> demultiplexer_error add(Arguments&, bool notify=true);
>
> template <typename Arguments>
> bool remove(Arguments&, bool notify=true);
>
> bool handle_events(long timeout=-1); // one shot
> void run(); // until stop()
> void stop();
> void notify(); // eg, new events to handle
> }
>
> The tricky bit seems to be creating concrete Argument classes,
> which provide the information about the resource the demultiplexer
> should wait on, possibly the type of event to wait for, and the
> function it should call if an event occurs.

I also agree that this is a difficult part. However, in the way I've
set up my prototype, this itself isn't actually a problem, as the
registering of events of organized slightly differently.

> Does that make any sense?

Yes.

> Does that compare somewhat to your proposal?

Well, I think I've done things a little differently. Allow me to wait
until I have something to show, though, before I elaborate.

By the way, I've tentatively named my prototype class and the associated
components 'notify.' Someone--I don't remember who--pointed out earlier
that the name 'demultiplexor' is fairly awful, and suggested that new
name instead. I like it. :)

Aaron W. LaFramboise


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net