Commit e11d01f4 authored by Yutong Zhao's avatar Yutong Zhao
Browse files

Removed unnecessary Integrator base class.

parent 6c7b8737
#ifndef OPENMM_INTEGRATOR_PROXY_H_
#define OPENMM_INTEGRATOR_PROXY_H_
#include "openmm/internal/windowsExport.h"
#include "openmm/serialization/SerializationProxy.h"
namespace OpenMM {
/**
* This is a proxy for serializing generic Integrator objects.
* It makes calls to the serialize/deserialize methods in
* derived classes of Integrator.
*/
class OPENMM_EXPORT IntegratorProxy : public SerializationProxy {
public:
IntegratorProxy();
virtual void serialize(const void* object, SerializationNode& node) const;
virtual void* deserialize(const SerializationNode& node) const;
};
} // namespace OpenMM
#endif /*OPENMM_INTEGRATOR_PROXY_H_*/
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2010 Stanford University and the Authors. *
* Authors: Peter Eastman, *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "openmm/serialization/IntegratorProxy.h"
#include "openmm/serialization/SerializationNode.h"
#include <OpenMM.h>
using namespace std;
using namespace OpenMM;
IntegratorProxy::IntegratorProxy() : SerializationProxy("Integrator") {
}
void IntegratorProxy::serialize(const void* object, SerializationNode& node) const {
node.createChildNode("Integrator", reinterpret_cast<const Integrator *>(object));
}
void* IntegratorProxy::deserialize(const SerializationNode& node) const {
return node.decodeObject<Integrator>();
}
\ No newline at end of file
......@@ -115,5 +115,4 @@ extern "C" void registerSerializationProxies() {
SerializationProxy::registerProxy(typeid(State), new StateProxy());
SerializationProxy::registerProxy(typeid(VerletIntegrator), new VerletIntegratorProxy());
SerializationProxy::registerProxy(typeid(LangevinIntegrator), new LangevinIntegratorProxy());
SerializationProxy::registerProxy(typeid(Integrator), new IntegratorProxy());
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment