"Wrapping" with SWIG
Most agile (scripting) languages provide a way to interface to C/C++ code. This practice of interfacing C/C++ code to an agile language is often referred to as "extending" or "writing an extension" for the agile language. In many cases, these languages are implemented in C/C++, so the method for writing extensions involves writing C/C++ code to use the underlying C/C++ API used to implement the language. In many cases, this extension code can be tedious to write; this is where the Simple Wrapper Interface Generator (SWIG) comes in. SWIG contains a C/C++ parser that can parse for function and class definitions and then generate extension code for several agile languages as well as Java. This process is also referred to as "wrapping" the C/C++ code because SWIG generates the tedious wrapper code needed to access that code from the agile language.
P.T.