qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stitcher <astitc...@redhat.com>
Subject Re: ./qpid/management/ManagementDirectExchange.h
Date Wed, 01 Feb 2012 17:24:20 GMT
On Tue, 2012-01-31 at 10:47 -0500, Alan Conway wrote:
> On 05/12/2011 02:57 PM, Carl Trieloff wrote:
> >
> >
> > ManagementDirectExchange::ManagementDirectExchange(const std::string&  _name,
> >                                                     bool
> > _durable,
> >                                                     const FieldTable&   _args,
> >                                                     Manageable*
> > _parent, Broker* b ) :
> >      Exchange (_name, _durable, _args, _parent, b),
> >      DirectExchange(_name, _durable, _args, _parent, b),
> >      managementAgent(0) {}
> >
> >
> > why do we call Exchange() and DirectExchange() -- we only need
> > DirectExchange() which will call Exchange() or am I missing something?
> >
> 
> class ManagementDirectExchange : public virtual DirectExchange
> 
> Using virtual inheritance forces  you to explicitly call all the base class 
> constructors, a bit of arcane C++ lore. However I have no idea why virtual 
> inheritance is used here. It may be unnecessary.

There was a lot of unnecessary use of virtual inheritance early in the
history of the C++ code. Much of it has gone as code has been
maintained, quite possibly this is just an unnoticed hangover from that
era.

It's unlikely that virtual inheritance is really necessary here.

Andrew



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message