Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G


Jump to: navigation, search

Howto:Extend Nasal

53 bytes added, 15:14, 15 November 2015
Status (cppbind)
Most of the code in the Nasal subsystem itself (FGNasalSys) also still uses the legacy C APIs - this is just to explain the two approaches, to avoid unnecessary confusion.
Overall, it's a good idea to favor cppbind over the low-level approach documented here, it isn't only much more elegant, but also saves you tons of typingand time, too
The new cppbind framework makes heavy use of modern C++, so that C++ data structures and classes/methods (including templates) can now be easily exposed to Nasal space and vice versa.
Implementation examples are to be found in $FG_SRC/Scripting.
Some of the more straightforward things to play with would be exposing useful SG/FG classes to Nasal space, such as the SGSubsystem interface to register scripted SGSubsystems, or the autopilot system.
For more technical Nasal questions (C API, internals etc), you'll probably want to refer to the forum, in particular: Philosopher, TheTom, Zakalawe or Hooray - TheTom and Zakalawe can also provide help on using cppbind, having both used it extensively during while developing/extending the last monthsCanvas system.
== Pre-requisites ==

Navigation menu