API change in SVN

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Michael Garrahan
Posts: 11
Joined: Fri Aug 21, 2009 4:32 pm

API change in SVN

Post by Michael Garrahan » Mon Apr 22, 2013 12:21 pm

Revision 3739 adds const modifiers to some API methods:
  • Force::createImpl
    ForceImpl::getOwner
If you are implementing "MyForce" in a plugin, this requires similar changes to:
  • MyForce::createImpl
    MyForceImpl::MyForceImpl
    MyForceImpl::getOwner
    MyForceImpl::owner
This won't be part of release 5.1, will it?

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

Re: API change in SVN

Post by Peter Eastman » Mon Apr 22, 2013 12:58 pm

Yes, this will be in 5.1. And yes, it will require adding a const modifier to a few methods in plugins. Is that a problem for you?

Peter

User avatar
Michael Garrahan
Posts: 11
Joined: Fri Aug 21, 2009 4:32 pm

Re: API change in SVN

Post by Michael Garrahan » Mon Apr 22, 2013 1:47 pm

The 5.1 beta does not have those const modifiers, so at the moment our plugin has one version for the 5.1 beta and one for the head of the svn trunk. I'd like to find a way to make the same plugin source compatible with either 5.0 or 5.1 at compile time. If that isn't possible, we'll probably have to say our plugin requires 5.1.

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

Re: API change in SVN

Post by Peter Eastman » Mon Apr 22, 2013 5:30 pm

Sorry about that. We try hard to maintain source level compatibility as far as client code is concerned, but plugins often need (hopefully minor) code changes to work with new releases.

Peter

POST REPLY