Bug 430498 - Client API separation and binary compatibility protection
Client API separation and binary compatibility protection
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
All Linux
urgent Severity high
: 1.3
: ---
Assigned To: Alan Conway
Frantisek Reznicek
: 450154 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-01-28 09:39 EST by Alan Conway
Modified: 2015-11-15 19:05 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-10-20 07:28:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alan Conway 2008-01-28 09:39:14 EST
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 13:46:14 EST
*** Bug 450154 has been marked as a duplicate of this bug. ***
Comment 2 Alan Conway 2009-08-03 17:41:32 EDT
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 06:11:31 EDT
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;

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 02:58:27 EDT
Thanks for explanation.

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


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