Boost logo

Boost :

From: Boris Schäling (boris_at_[hidden])
Date: 2002-11-27 14:13:42


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Hamish Mackenzie
> Sent: Wednesday, November 27, 2002 1:41 PM
> To: Boost mailing list
> Subject: RE: [boost] Socket Multiplexing
>
>
> On Tue, 2002-11-26 at 20:55, Boris Schäling wrote:
> > > * should not require virtual base class interface
> >
> > What does this mean? No polymorphism?!
>
> No, it just means templates (compile time polymorphism).
>
> Higher levels can add virtual functions but we shouldn't need them in
> the lower layers. Even in the higher levels virtual functions should be
> optional.
>
> Consider the your socket multiplexor design. We could use templates
> something like this...
>
> template< typename ObserverType = observer >
> class multiplexor{ ... }

observer is not the problem but the many server, client and stream classes
are. As the multiplexor has to select on many file descriptors he has to
notify many different classes that are currently derived from communicator.
I don't know if templates can help here, too?

Boris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk