]> git.mxchange.org Git - simgear.git/blobdiff - simgear/props/PropertyBasedElement.hxx
cppbind: automatic conversion of SGReferenced derived pointers.
[simgear.git] / simgear / props / PropertyBasedElement.hxx
index bdae05370fa01c2105a9f74995fb1115c761d9fc..b2ccd30b74fd0c3f1802bb8b1ac647dfe62a6f58 100644 (file)
@@ -43,6 +43,20 @@ namespace simgear
       PropertyBasedElement(SGPropertyNode* node);
       virtual ~PropertyBasedElement();
 
+      /**
+       * Remove the property listener of the element.
+       *
+       * You will need to call the appropriate methods (#childAdded,
+       * #childRemoved, #valueChanged) yourself to ensure the element still
+       * receives the needed events.
+       */
+      void removeListener();
+
+      /**
+       * Destroys this element (removes node from property tree)
+       */
+      void destroy();
+
       virtual void update(double delta_time_sec) = 0;
 
       SGConstPropertyNode_ptr getProps() const;
@@ -67,6 +81,7 @@ namespace simgear
       }
 
       virtual void setSelf(const PropertyBasedElementPtr& self);
+      virtual void onDestroy() {};
 
     protected: