Commit 3e467788 authored by T.J. Corona's avatar T.J. Corona

smtk::view::View: represent as shared in pybind11.

parent 11a7984b
......@@ -46,6 +46,6 @@ PYBIND11_MODULE(_smtkPybindView, view)
PySharedPtrClass< smtk::view::DescriptivePhrase > smtk_view_DescriptivePhrase = pybind11_init_smtk_view_DescriptivePhrase(view);
PySharedPtrClass< smtk::view::SubphraseGenerator > smtk_view_SubphraseGenerator = pybind11_init_smtk_view_SubphraseGenerator(view);
py::class_< smtk::view::View > smtk_view_View = pybind11_init_smtk_view_View(view);
PySharedPtrClass< smtk::view::View > smtk_view_View = pybind11_init_smtk_view_View(view);
py::class_< smtk::view::Selection > smtk_view_Selection = pybind11_init_smtk_view_Selection(view);
}
......@@ -17,14 +17,14 @@
namespace py = pybind11;
py::class_< smtk::view::View > pybind11_init_smtk_view_View(py::module &m)
PySharedPtrClass< smtk::view::View > pybind11_init_smtk_view_View(py::module &m)
{
py::class_< smtk::view::View > instance(m, "View");
PySharedPtrClass< smtk::view::View > instance(m, "View");
instance
.def(py::init<::std::string const &, ::std::string const &>())
.def(py::init<::smtk::view::View const &>())
.def("deepcopy", (smtk::view::View & (smtk::view::View::*)(::smtk::view::View const &)) &smtk::view::View::operator=)
.def_static("New", &smtk::view::View::New, py::arg("myType"), py::arg("myTitle"))
.def_static("New", &smtk::view::View::New, py::arg("myType"), py::arg("myTitle"), py::return_value_policy::take_ownership)
.def("title", &smtk::view::View::title)
.def("type", &smtk::view::View::type)
.def("iconName", &smtk::view::View::iconName)
......
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