qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-342) Imrpove C++ client API
Date Thu, 01 Feb 2007 20:07:05 GMT
Imrpove C++ client API
----------------------

                 Key: QPID-342
                 URL: https://issues.apache.org/jira/browse/QPID-342
             Project: Qpid
          Issue Type: Improvement
          Components: C++ Client
            Reporter: Alan Conway


Currently the C++ client API is like this:

Connection myConnection;
myConnection.open(...);
Channel myChannel;
myConnection.openChannel(myChannel);
myChannel.dostuff...

I would like to change it to be like this:

Connection::shared_ptr myConnection = Connection::open(...); 
Channel::shared_ptr myChannel = myConnection->openChannel(...channel args);
myChannel->dostuff...

There are two problems with the current approach:
 - constructor creates "lame" objects, need an open() call to make them
useful.
 - Letting user call constructor directly means we can't change the
implementation class, whereas the second approach allows us to return
anything inheriting from the user-visible class.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message