Skip to content

Commit

Permalink
use EXPORT_PLUGIN macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrop107 committed Jan 18, 2024
1 parent 8d7f502 commit 1a2803a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/python/doc_snippets/export_pluginplay_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
#include "../../cxx/doc_snippets/force.hpp"
#include "../../cxx/doc_snippets/load_modules.hpp"
#include "../../cxx/doc_snippets/point_charge.hpp"
#include <pluginplay/plugin/plugin.hpp>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>


namespace pluginplay_examples {

PYBIND11_MODULE(pluginplay_examples, m) {
EXPORT_PLUGIN(pluginplay_examples, m) {
pybind11::class_<PointCharge>(m, "PointCharge")
.def(pybind11::init<>())
.def(pybind11::init<double, Point>())
Expand All @@ -32,7 +33,6 @@ PYBIND11_MODULE(pluginplay_examples, m) {
.def(pybind11::self == pybind11::self)
.def(pybind11::self < pybind11::self);

m.def("load_modules", &load_modules);
EXPORT_PROPERTY_TYPE(ElectricField, m);
EXPORT_PROPERTY_TYPE(Force, m);
}
Expand Down

0 comments on commit 1a2803a

Please sign in to comment.