hashset(_globals, moduleName, locals);
}
+void FGNasalSys::deleteModule(const char* moduleName)
+{
+ naRef modname = naNewString(_context);
+ naStr_fromdata(modname, (char*)moduleName, strlen(moduleName));
+ naModLock();
+ naHash_delete(_globals, modname);
+ naModUnlock();
+}
+
naRef FGNasalSys::parse(const char* filename, const char* buf, int len)
{
int errLine = -1;
void createModule(const char* moduleName, const char* fileName,
const char* src, int len);
+ void deleteModule(const char* moduleName);
+
private:
friend class FGNasalScript;
friend class FGNasalListener;
public: void handleTimer(NasalTimer* t);
};
+
class FGNasalScript {
public:
~FGNasalScript() { _nas->gcRelease(_gcKey); }
FGNasalSys* _nas;
};
+
class FGNasalListener : public SGPropertyChangeListener {
public:
FGNasalListener(SGPropertyNode_ptr node, naRef handler,