0

The first question: The class_ class has four parameters.

class template class_<T, Bases, HeldType, NonCopyable>

I don't understand the parameters of Bases and HeldType.How to use the parameters. this doc: http://www.boost.org/doc/libs/1_51_0/libs/python/doc/v2/class.html

The second question: I have to make a python function as callback of a c++ function.How to do?Where can I find some examples??

simon
  • 569
  • 9
  • 20

1 Answers1

0

The HeldType is usefull, if you want to use a special object to hold your object. For e.g. if you use shared_ptr<> inside your implementation you can use this as HeldType.

If you have no idea what shared_ptr are, just google for them, they are a nice tool.

Further descriptions as an example for the shared_ptr<> as HeldType can be found here: Python Wiki, deailing with smart pointers

Sven
  • 710
  • 9
  • 18