qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stitcher <astitc...@redhat.com>
Subject Re: [c++]: messaging api, uuids and handles
Date Wed, 13 Jan 2010 16:04:16 GMT
On Wed, 2010-01-13 at 10:52 -0500, Alan Conway wrote:
> On 01/13/2010 09:42 AM, Gordon Sim wrote:
> > I have an outstanding Jira (QPID-2323) to add support for uuids as a
> > value for a Variant in the 'new' API (it is wanted for QMF and seems
> > like it might be a generically useful type).
> >
> > The current Uuid class is in qpid::framing and has exposed dependencies
> > on things I don't want to be part of the API (such as boost::array and
> > qpid::framing::Buffer).
> >
> > My thought therefore is to create a copy of that class in the
> > qpid::messaging namespace, pimpled and cleaned up to avoid the undesired
> > dependencies. Does that sound like the right approach?
> 
> I don't think it should be pimpled, it's a value type and the 16-byte 
> representation will never change. I'd suggest a char[16] member and manually 
> write the stuff that boost::array provides (copy, assign etc.)

I think it's a toss up between these approaches, but I'd note that
pimpling will allow force you to make the interface explicit (including
the assigns/copies etc.) so that you should easily be able to move to
the other implementation. Although in that case the ABI would change,
but the effective API wouldn't.

> 
> > While on the subject of namespaces and dependencies, is there any need
> > to worry about using qpid::client::Handle? That is the superclass of
> > most of the API classes now.
> 
> That class has no dependencies but if you're concerned about having any 
> dependencies on the client namespace you could copy it to messaging::Handle.

I agree that qpid::messaging should be completely self contained and be
usable without qpid::client so copying would be a way to go - you could
reverse the namespace dependency maybe.

Andrew

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



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


Mime
View raw message