+
+ // Callbacks for command and timer bindings
+ virtual bool handleCommand( const char* moduleName,
+ const char* fileName,
+ const char* src,
+ const SGPropertyNode* arg = 0 );
+ virtual bool handleCommand(const SGPropertyNode* arg);
+
+ bool createModule(const char* moduleName, const char* fileName,
+ const char* src, int len, const SGPropertyNode* cmdarg=0,
+ int argc=0, naRef*args=0);
+
+ 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);}
+
+ // can't call this 'globals' due to naming clash
+ naRef nasalGlobals() const
+ { return _globals; }
+
+ naContext context() const
+ { return _context; }
+
+ // This mechanism is here to allow naRefs to be passed to
+ // locations "outside" the interpreter. Normally, such a
+ // reference would be garbage collected unexpectedly. By passing
+ // it to gcSave and getting a key/handle, it can be cached in a
+ // globals.__gcsave hash. Be sure to release it with gcRelease
+ // when done.
+ int gcSave(naRef r);
+ void gcRelease(int key);