]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/NasalSys.hxx
Merge branch 'maint' into next
[flightgear.git] / src / Scripting / NasalSys.hxx
index e010ba3485f46599a0098fbf2cf6dd75cc67f8a7..6d64e5097ba66f3ddfd4dd01902178c047bae76d 100644 (file)
@@ -54,11 +54,13 @@ public:
     virtual bool handleCommand(const SGPropertyNode* arg);
 
     void createModule(const char* moduleName, const char* fileName,
-                    const char* src, int len, const SGPropertyNode* arg=0);
+                      const char* src, int len, const SGPropertyNode* cmdarg=0,
+                      int argc=0, naRef*args=0);
 
     void deleteModule(const char* moduleName);
 
     naRef call(naRef code, int argc, naRef* args, naRef locals);
+    naRef propNodeGhost(SGPropertyNode* handle);
 
 private:
     friend class FGNasalScript;
@@ -87,7 +89,6 @@ private:
     void logError(naContext);
     naRef parse(const char* filename, const char* buf, int len);
     naRef genPropsModule();
-    naRef propNodeGhost(SGPropertyNode* handle);
 
     // This mechanism is here to allow naRefs to be passed to
     // locations "outside" the interpreter.  Normally, such a
@@ -132,7 +133,7 @@ private:
 class FGNasalListener : public SGPropertyChangeListener {
 public:
     FGNasalListener(SGPropertyNode* node, naRef code, FGNasalSys* nasal,
-                    int key, int id, int type);
+                    int key, int id, int init, int type);
 
     virtual ~FGNasalListener();
     virtual void valueChanged(SGPropertyNode* node);
@@ -149,10 +150,10 @@ private:
     int _gcKey;
     int _id;
     FGNasalSys* _nas;
+    int _init;
     int _type;
     unsigned int _active;
     bool _dead;
-    bool _first_call;
     long _last_int;
     double _last_float;
     string _last_string;
@@ -166,6 +167,7 @@ public:
     void modelLoaded(const string& path, SGPropertyNode *prop, osg::Node *);
 
 private:
+    static unsigned int _module_id;
     string _module;
     SGPropertyNode_ptr _root;
     SGConstPropertyNode_ptr _unload;