-
Notifications
You must be signed in to change notification settings - Fork 384
Expand file tree
/
Copy pathParameterObjectModule.cpp
More file actions
30 lines (25 loc) · 1.29 KB
/
ParameterObjectModule.cpp
File metadata and controls
30 lines (25 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// Created by sjeske on 1/22/20.
//
#include "common.h"
#include <pybind11/pybind11.h>
#include <pybind11/eigen.h>
#include <pybind11/stl_bind.h>
#include <Common/Common.h>
#include <ParameterObject.h>
namespace py = pybind11;
void ParameterObjectModule(py::module m_sub){
//auto m_sub = m.def_submodule("Common");
py::class_<GenParam::ParameterObject>(m_sub, "ParameterObject")
// .def(py::init<>()) TODO: no constructor for now because this object does not need to be constructable
.def("getValueBool", &GenParam::ParameterObject::getValue<bool>)
.def("getValueInt", &GenParam::ParameterObject::getValue<int>)
.def("getValueUInt", &GenParam::ParameterObject::getValue<unsigned int>)
.def("getValueFloat", &GenParam::ParameterObject::getValue<Real>)
.def("getValueString", &GenParam::ParameterObject::getValue<std::string>)
.def("setValueBool", &GenParam::ParameterObject::setValue<bool>)
.def("setValueInt", &GenParam::ParameterObject::setValue<int>)
.def("setValueUInt", &GenParam::ParameterObject::setValue<unsigned int>)
.def("setValueFloat", &GenParam::ParameterObject::setValue<Real>)
.def("setValueString", &GenParam::ParameterObject::setValue<std::string>);
}