]> git.stg.codes - stg.git/commitdiff
Hide copy constructor and assignement operator for ACTION
authorMaxim Mamontov <faust.madf@gmail.com>
Wed, 14 Sep 2011 14:32:24 +0000 (17:32 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Wed, 14 Sep 2011 14:32:24 +0000 (17:32 +0300)
Add virtual destructor for ACTIONS_LIST

projects/stargazer/actions.h

index 53dde92b749aa04c08d2fd56b95c3a1471a9d1c8..6c1fc8a8c671ea9c7ed24781af0ff867990d09bb 100644 (file)
@@ -28,7 +28,7 @@ typedef void (ACTIVE_CLASS::*TYPE)(DATA_TYPE);
 class BASE_ACTION
 {
 public:
-    virtual ~BASE_ACTION() {};
+    virtual ~BASE_ACTION() {}
     virtual void Invoke() = 0;
 };
 
@@ -44,6 +44,9 @@ public:
         : activeClass(ac), actor(a), data(d) {};
     void Invoke();
 private:
+    ACTION(const ACTION<ACTIVE_CLASS, DATA_TYPE> & rvalue);
+    ACTION<ACTIVE_CLASS, DATA_TYPE> & operator=(const ACTION<ACTIVE_CLASS, DATA_TYPE> & rvalue);
+
     ACTIVE_CLASS & activeClass;
     typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE actor;
     DATA_TYPE data;
@@ -60,7 +63,7 @@ public:
     // Initialize mutex
     ACTIONS_LIST();
     // Delete actions and destroy mutex
-    ~ACTIONS_LIST();
+    virtual ~ACTIONS_LIST();
 
     parent::iterator begin();
     parent::iterator end();