Bug 430498 - Client API separation and binary compatibility protection
Summary: Client API separation and binary compatibility protection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: beta
Hardware: All
OS: Linux
urgent
high
Target Milestone: 1.3
: ---
Assignee: Alan Conway
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
: 450154 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-28 14:39 UTC by Alan Conway
Modified: 2015-11-16 00:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-20 11:28:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alan Conway 2008-01-28 14:39:14 UTC
NB: This is required for whatever API we finally ship, it is not about making
the API better for users, but about making it more supportable for us.

1. Use the PIMPL pattern (http://en.wikipedia.org/wiki/Pimpl) so that private
implementation classes do no need to be exposed in public headers. Break any
other un-necessary header dependencies from public heaeers.

2. Move all (and only) public headers from qpid/src to qpid/include.

3. Build all "pure-client" tests and samples with -Iinclude and NOT -I src.
 
further and provide a full Pimpl client API to provide a binary compatibility
safeguard. (http://en.wikipedia.org/wiki/Pimpl for definition of Pimpl) We
should use shared_ptr to get normal copy semantics and automated memory
management and templatize as much repetative code as possible.

Related JIRAS: https://issues.apache.org/jira/browse/QPID-342

Comment 1 Gordon Sim 2009-02-16 18:46:14 UTC
*** Bug 450154 has been marked as a duplicate of this bug. ***

Comment 2 Alan Conway 2009-08-03 21:41:32 UTC
All public headers are in separate include/ directory as of revision 798291.
Public API has been refactored to use pimpl pattern.

Comment 4 Frantisek Reznicek 2010-05-17 10:11:31 UTC
1] The public headers moved to qpid/include.
2] Pure client tests are not compiled with -Iinclude only, in fact both are used:

        if   g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I../../include 
             -I../../include -I../../src -I../../src   -pedantic -Wall 
             -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align 
             ... 
             QueueRegistryTest.o -MD -MP -MF "$depbase.Tpo" -c -o   
             QueueRegistryTest.o QueueRegistryTest.cpp; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo";
             exit 1;
       fi

This would be fine if qpid/src is free of header files, but there are two exceptions: ( http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/ )
  config.h which is most probably fine, because it keeps compilation config
  but there is also qpidd.h.
3] PIMPL pattern recognized in qpid/include headers which are only public.
  grep Impl *.h* | grep include      # gives nothing
  grep Impl */*.h* | grep include    # gives nothing
  grep Impl */*/*.h* | grep include  # gives nothing



Is it waiveable to have -I../../src -I../../include used for client compilation (part of make check) and qpid/src/qpidd.h present in qpid/src/ ?

Comment 6 Frantisek Reznicek 2010-05-18 06:58:27 UTC
Thanks for explanation.

The feature has been implemented. Verified on qpid source tree from qpid-cpp-mrg-0.7.935473-1.src.rpm.


-> VERIFIED


Note You need to log in before you can comment on or make changes to this bug.