Adding Name's operators binding

This commit is contained in:
Damien Dupuis 2010-06-15 14:18:05 +00:00
parent 0a06335e15
commit 685dde710f
2 changed files with 15 additions and 10 deletions

View File

@ -24,6 +24,11 @@ BOOST_PYTHON_MODULE(pyDTR) {
// class DTR::Name // class DTR::Name
class_<Name>("Name", init<std::string>()) class_<Name>("Name", init<std::string>())
.def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a refenrce on string .def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a refenrce on string
.def(self == self)
.def(self == std::string())
.def(self != self)
.def(self != std::string())
.def(self < self)
; ;
// class DTR::Rule // class DTR::Rule