Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. //
  2. // Created by mew on 12.12.17.
  3. //
  4. #include <boost/python.hpp>
  5. #include "library.h"
  6.  
  7. using namespace boost::python;
  8.  
  9. BOOST_PYTHON_MODULE(test_boost_1)
  10. {
  11. class_<Some>( "Some" )
  12. .def( init<int,string>( args( "some_id", "name" ) ) )
  13. .def( "ID", &Some::ID )
  14. .def( "Name", &Some::Name, return_value_policy<copy_const_reference>() )
  15. .def( "ResetID", static_cast< void (Some::*)() >( &Some::ResetID ) )
  16. .def( "ResetID", static_cast< void (Some::*)(int) >( &Some::ResetID ), args( "some_id" ) )
  17. .def( "ChangeName", &Some::ChangeName, args( "name" ) )
  18. .def( "SomeChanges", &Some::SomeChanges, args( "some_id", "name" ) )
  19. .add_static_property( "NOT_AN_IDENTIFIER", make_getter( &Some::NOT_AN_IDENTIFIER ) )
  20. ;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement