Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
Line 408: Line 408:
</pre>
</pre>


== A standard interface for mapping C++ classes to Nasal objects ==
== A standard interface for mapping C++ classes to Nasal objects (Status 2013: implemented in cppbind) ==


There's a plan to eventually generalize and unify all those helpers in FGPositioned.cxx 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, just by implementing a certain interface. By exposing objects with methods, rather than plain variables, it will be possible to compute results lazily.
There's a plan to eventually generalize and unify all those helpers in FGPositioned.cxx 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, just by implementing a certain interface. By exposing objects with methods, rather than plain variables, it will be possible to compute results lazily.

Navigation menu