void deleteModule(const char* moduleName);
- naRef call(naRef code, naRef locals);
+ naRef call(naRef code, int argc, naRef* args, naRef locals);
private:
friend class FGNasalScript;
// Listener
map<int, FGNasalListener *> _listener;
+ vector<FGNasalListener *> _dead_listener;
static int _listenerId;
- bool _purgeListeners;
void loadPropertyScripts();
void hashset(naRef hash, const char* key, naRef val);
class FGNasalListener : public SGPropertyChangeListener {
public:
- FGNasalListener(SGPropertyNode_ptr node, naRef handler,
- FGNasalSys* nasal, int key, int id, int type);
+ FGNasalListener(SGPropertyNode* node, naRef code, FGNasalSys* nasal,
+ int key, int id, int type);
- ~FGNasalListener();
- void valueChanged(SGPropertyNode* node);
- bool unchanged(SGPropertyNode* node);
+ virtual ~FGNasalListener();
+ virtual void valueChanged(SGPropertyNode* node);
+ virtual void childAdded(SGPropertyNode* parent, SGPropertyNode* child);
+ virtual void childRemoved(SGPropertyNode* parent, SGPropertyNode* child);
private:
+ bool changed(SGPropertyNode* node);
+ void call(SGPropertyNode* which, naRef mode);
+
friend class FGNasalSys;
SGPropertyNode_ptr _node;
- naRef _handler;
+ naRef _code;
int _gcKey;
int _id;
- int _type;
FGNasalSys* _nas;
+ int _type;
unsigned int _active;
bool _dead;
bool _first_call;