X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2FNasalSys.hxx;h=973730e4770f99eb19b77eb9ff0012e195ce6dab;hb=5146868bfb63895edb6c89b24a9ba216420485c2;hp=a5adff44e0efc5b2a816e1d0ea0370795da179ca;hpb=7b663cd7f7aaceb185a5970b5ea43f8445cc58f1;p=flightgear.git diff --git a/src/Scripting/NasalSys.hxx b/src/Scripting/NasalSys.hxx index a5adff44e..973730e47 100644 --- a/src/Scripting/NasalSys.hxx +++ b/src/Scripting/NasalSys.hxx @@ -4,10 +4,16 @@ #include #include #include +#include #include #include #include +// Required only for MSVC +#ifdef _MSC_VER +# include +#endif + #include @@ -59,6 +65,12 @@ public: void setCmdArg(SGPropertyNode* aNode); + /** + * create Nasal props.Node for an SGPropertyNode* + * This is the actual ghost, wrapped in a Nasal sugar class. + */ + naRef wrappedPropsNode(SGPropertyNode* aProps); + // Callbacks for command and timer bindings virtual bool handleCommand( const char* moduleName, const char* fileName, @@ -97,6 +109,9 @@ public: naContext context() const { return _context; } + + nasal::Hash getGlobals() const + { return nasal::Hash(_globals, _context); } // This mechanism is here to allow naRefs to be passed to // locations "outside" the interpreter. Normally, such a @@ -119,6 +134,11 @@ private: SGLockedQueue > _loadList; SGLockedQueue > _unloadList; + // Delay removing items of the _loadList to ensure the are already attached + // to the scene graph (eg. enables to retrieve world position in load + // callback). + bool _delay_load; + // // FGTimer subclass for handling Nasal timer callbacks. // See the implementation of the settimer() extension function for