From 060fc0e00bacb96d1d16163779d98c45c3999014 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Nov 2009 02:27:29 -0500 Subject: Made many object methods in Python properties --- src/py_utils.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/py_utils.cc') diff --git a/src/py_utils.cc b/src/py_utils.cc index c2177c20..b2b9d0f8 100644 --- a/src/py_utils.cc +++ b/src/py_utils.cc @@ -172,9 +172,10 @@ void export_utils() .def(init >()) .def(init()) - .def("flags", &supports_flags::flags) + .add_property("flags", + &supports_flags::flags, + &supports_flags::set_flags) .def("has_flags", &supports_flags::has_flags) - .def("set_flags", &supports_flags::set_flags) .def("clear_flags", &supports_flags::clear_flags) .def("add_flags", &supports_flags::add_flags) .def("drop_flags", &supports_flags::drop_flags) @@ -184,9 +185,10 @@ void export_utils() .def(init >()) .def(init()) - .def("flags", &supports_flags::flags) + .add_property("flags", + &supports_flags::flags, + &supports_flags::set_flags) .def("has_flags", &supports_flags::has_flags) - .def("set_flags", &supports_flags::set_flags) .def("clear_flags", &supports_flags::clear_flags) .def("add_flags", &supports_flags::add_flags) .def("drop_flags", &supports_flags::drop_flags) @@ -204,9 +206,10 @@ void export_utils() class_< delegates_flags, boost::noncopyable > ("DelegatesFlags16", no_init) - .def("flags", &delegates_flags::flags) + .add_property("flags", + &delegates_flags::flags, + &delegates_flags::set_flags) .def("has_flags", &delegates_flags::has_flags) - .def("set_flags", &delegates_flags::set_flags) .def("clear_flags", &delegates_flags::clear_flags) .def("add_flags", &delegates_flags::add_flags) .def("drop_flags", &delegates_flags::drop_flags) -- cgit v1.2.3