arafatkatze / swig

A simple repository for showing examples on swig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shows a few cool examples of using swig with Ruby.
The examples are about

  • A Simple Class
  • A function
  • Constants
  • STL :: vector
  • STL :: set
  • STL :: map

One of the coolest things is the usage of C++ stl contatiners namely Vector and Set.
We can see that you can use c++ set to get elements in sorted order.
Also notice the way I have used Ruby native objects with STL maps. This kind of usage is not possible with either ruby or C++but its cool to see how we can use swig here.

Try these commands
ruby extconf.rb
make
irb -r./example

About

A simple repository for showing examples on swig


Languages

Language:C++ 98.1%Language:Makefile 1.8%Language:Ruby 0.0%