Via SWIG

Overview

SWIG is the "Simplified Wrapper Generator", and allows a programmer to wrap his C or C++ application's interface so that it can be used from a number of scripting languages.

Emdros implements SWIG interfaces for a number of languages. They include:

  • Python 2.7
  • Python 3.x
  • Java
  • C# (or other .Net languages)
  • Ruby
  • Perl
  • PHP5
  • PHP7

This means that you can use Emdros from these scripting languages as though you were writing in C++ with almost no performance overhead. The libraries are linked in through dynamic library loading.

Granted, Java and C# are not scripting languages, but are mentioned as such here for simplicity of presentation.

Availability Note: currently, only Python 2.7-bindings, C#/.Net-bindings, and Java-bindings are available on Windows. All are available on Linux, and some are available on macOS/Mac OS X. It is unknown whether any will work on Solaris.

Benefits

Benefits include:

  • Having the simplicity and rapid prototyping of scripting languages.
  • Losing none of the power of direct access to the Emdros class hierarchy.
  • Not having to parse the output from MQL, instead directly accessing the MQLResult object. This reduces performance overhead.

Drawbacks

Drawbacks include:

  • Slightly slower performance than with pure C++.

Previous:Via C++
Up:Ways of calling Emdros
Next:Via mql(1) as a command