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

Changes

Jump to: navigation, search

Howto:Extend Nasal

75 bytes added, 17:34, 27 June 2012
m
Wrapping Classes as Nasal Objects (ghosts)
'''To be written by Hooray & Zakalawe'''
For the time being, it's a good idea to take a look at the FGPositioned wrappers for the navdb to see how this is done in Nasal, see [https://gitorious.org/fg/flightgear/blobs/next/src/Scripting/NasalPositioned.cxx $FG_SRC/Scripting/NasalPositioned.cxx].
 
== Background ==
Quoting: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17546.html
<pre>
</pre>
For the time being, it's a good idea to take a look at the FGPositioned wrappers == A standard interface for the navdb mapping C++ classes to see how this is done in Nasal, see [https://gitorious.org/fg/flightgear/blobs/next/src/Scripting/NasalPositioned.cxx $FG_SRC/Scripting/NasalPositioned.cxx].objects ==
There's a plan to eventually unify all those helpers and provide them as part of the FGNasalSys class (or some custom abstract base class that C++ classes should implement to expose objects to Nasal), so that they automatically become available to all users of the Nasal subsystem.
private:
};
</syntaxhighlight lang="cpp">
The ghost_destructor could also be implemented as a method of FGNasalWrapper (rather than being a global void* function), so that each C++ class that is to be exposed to Nasal, would only need to implement the class-specific methods.
18,253
edits

Navigation menu