X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2FNasalSys.hxx;h=5434844998fb077d1a5df1cab0e771a960703406;hb=6dd47822545bf27f69a18a2d0ccc8abf91daa8d5;hp=0dad5fd530f1d7d413d4be6187c50cb257235609;hpb=6110139197f594f7703cb52235f1de63feb68745;p=flightgear.git diff --git a/src/Scripting/NasalSys.hxx b/src/Scripting/NasalSys.hxx index 0dad5fd53..543484499 100644 --- a/src/Scripting/NasalSys.hxx +++ b/src/Scripting/NasalSys.hxx @@ -14,7 +14,7 @@ class FGNasalScript; class FGNasalListener; - +class SGCondition; /** Nasal model data container. * load and unload methods must be run in main thread (not thread-safe). */ @@ -65,6 +65,9 @@ protected: SGSharedPtr _data; }; +SGPropertyNode* ghostToPropNode(naRef ref); +SGCondition* conditionGhost(naRef r); + class FGNasalSys : public SGSubsystem { public: @@ -114,12 +117,22 @@ public: void deleteModule(const char* moduleName); + /** + * Set member of specified hash to given value + */ + void hashset(naRef hash, const char* key, naRef val); + + /** + * Set member of globals hash to given value + */ + void globalsSet(const char* key, naRef val); + naRef call(naRef code, int argc, naRef* args, naRef locals); naRef callMethod(naRef code, naRef self, int argc, naRef* args, naRef locals); naRef propNodeGhost(SGPropertyNode* handle); - + void registerToLoad(FGNasalModelData* data) { _loadList.push(data);} void registerToUnload(FGNasalModelData* data) { _unloadList.push(data);} @@ -168,7 +181,6 @@ private: void loadPropertyScripts(SGPropertyNode* n); void loadScriptDirectory(simgear::Dir nasalDir); void addModule(string moduleName, simgear::PathList scripts); - void hashset(naRef hash, const char* key, naRef val); void logError(naContext); naRef parse(const char* filename, const char* buf, int len); naRef genPropsModule();