Python bindings to C++ code¶
Since there are two programming languages (with major differences in their concepts) there need to be functionality to access classes and functions from one language in the other one. To access the C++ functions and classes in python code, their needs to be bound to Python.
Binding functions¶
For many practical reasons we decided to use Boost.Python to do the bindings. Boost.Python allows to selectively expose C++ functionality to Python. If you plan to develop C++ code for Bob that is going to be eventually used from a Python environment, we strongly recommend you:
- Carefully study the Boost Python Tutorial, which covers basic information on how to bind C++ classes and methods using their clever templating scheme;
- Study our own bindings to discover design patterns we have deployed through the code and that can be easily re-used on your extensions.