Chapter 11

Scripting

Publisher Summary

This chapter deals with the topic of scripting, that is to allow C++ API to be accessed from a scripting language, such as Python, Ruby, Lua, Tcl, or Perl. It reviews some of the main technologies that create bindings for these languages. It also details two different script-binding technologies and shows how these can be used to create bindings for two different scripting languages. Specifically, it provides an in-depth treatment of how to create Python bindings for C++ API using Boost Python, followed by a thorough analysis of how to create Ruby bindings using the Simplified Wrapper and Interface Generator (SWIG). It focuses on Python and Ruby because these are two of the most popular scripting languages ...

Get API Design for C++ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.