Merging 'master' into 'wrap'
commit
cbb866ffed
|
@ -412,7 +412,7 @@ class PybindWrapper:
|
||||||
|
|
||||||
def wrap_instantiated_declaration(
|
def wrap_instantiated_declaration(
|
||||||
self, instantiated_decl: instantiator.InstantiatedDeclaration):
|
self, instantiated_decl: instantiator.InstantiatedDeclaration):
|
||||||
"""Wrap the class."""
|
"""Wrap the forward declaration."""
|
||||||
module_var = self._gen_module_var(instantiated_decl.namespaces())
|
module_var = self._gen_module_var(instantiated_decl.namespaces())
|
||||||
cpp_class = instantiated_decl.to_cpp()
|
cpp_class = instantiated_decl.to_cpp()
|
||||||
if cpp_class in self.ignore_classes:
|
if cpp_class in self.ignore_classes:
|
||||||
|
@ -420,7 +420,7 @@ class PybindWrapper:
|
||||||
|
|
||||||
res = (
|
res = (
|
||||||
'\n py::class_<{cpp_class}, '
|
'\n py::class_<{cpp_class}, '
|
||||||
'{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}")'
|
'{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}");'
|
||||||
).format(shared_ptr_type=('boost' if self.use_boost else 'std'),
|
).format(shared_ptr_type=('boost' if self.use_boost else 'std'),
|
||||||
cpp_class=cpp_class,
|
cpp_class=cpp_class,
|
||||||
class_name=instantiated_decl.name,
|
class_name=instantiated_decl.name,
|
||||||
|
|
|
@ -37,15 +37,16 @@ extern "C" {
|
||||||
#include <mex.h>
|
#include <mex.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
|
||||||
#include <sstream>
|
|
||||||
#include <typeinfo>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <sstream>
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
|
#include <string>
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace boost; // not usual, but for conciseness of generated code
|
using namespace boost; // not usual, but for conciseness of generated code
|
||||||
|
|
|
@ -105,7 +105,7 @@ PYBIND11_MODULE(class_py, m_) {
|
||||||
return redirect.str();
|
return redirect.str();
|
||||||
}, py::arg("s") = "factor: ", py::arg("keyFormatter") = gtsam::DefaultKeyFormatter);
|
}, py::arg("s") = "factor: ", py::arg("keyFormatter") = gtsam::DefaultKeyFormatter);
|
||||||
|
|
||||||
py::class_<SuperCoolFactor<gtsam::Pose3>, std::shared_ptr<SuperCoolFactor<gtsam::Pose3>>>(m_, "SuperCoolFactorPose3")
|
py::class_<SuperCoolFactor<gtsam::Pose3>, std::shared_ptr<SuperCoolFactor<gtsam::Pose3>>>(m_, "SuperCoolFactorPose3");
|
||||||
|
|
||||||
#include "python/specializations.h"
|
#include "python/specializations.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// A base class
|
// A base class
|
||||||
virtual class MyBase {
|
virtual class MyBase {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// A templated class
|
// A templated class
|
||||||
|
|
Loading…
Reference in New Issue