We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e27a5c7 commit a1c1601Copy full SHA for a1c1601
python/exampleplugin.i
@@ -80,12 +80,16 @@ public:
80
%clear double& k;
81
82
/*
83
- * Add a function for casting a Force to an ExampleForce.
+ * Add methods for casting a Force to an ExampleForce.
84
*/
85
%extend {
86
static ExamplePlugin::ExampleForce& cast(OpenMM::Force& force) {
87
return dynamic_cast<ExamplePlugin::ExampleForce&>(force);
88
}
89
+
90
+ static bool isinstance(OpenMM::Force& force) {
91
+ return (dynamic_cast<ExamplePlugin::ExampleForce*>(&force) != NULL);
92
+ }
93
94
};
95
0 commit comments