Add shared ptr
[trackerpp.git] / src / Tracker.h
index c87f465..262ae5f 100644 (file)
@@ -5,33 +5,35 @@
 #include <string>
 #include <vector>
 #include "Metrics.h"
+#include "SharedPtr.h"
 
 namespace suanzi {
 
-typedef enum 
-{
-    Fire = -1,
-    Active = 2,
-    Lost,
-    Delete
-} TrackerStatus;
-
-class Tracker
-{
-public:
-    Tracker(int id);
-    virtual ~Tracker();
-    void updateState(const cv::Mat& image);
-    void addPatch(Patch* p);
-
-private:
-    TrackerStatus status;
-    TrackerStatus preStatus;
-    int id;
-    int age;
-    int last_active;
-    std::vector<Patch *> patches;
-};
+    typedef enum 
+    {
+        Fire = -1,
+        Active = 2,
+        Lost,
+        Delete
+    } TrackerStatus;
+
+    TK_DECLARE_PTR(Tracker);
+    class Tracker
+    {
+    public:
+        Tracker(int id);
+        virtual ~Tracker();
+        void updateState(const cv::Mat& image);
+        void addPatch(Patch* p);
+
+    private:
+        TrackerStatus status;
+        TrackerStatus preStatus;
+        int id;
+        int age;
+        int last_active;
+        std::vector<Patch *> patches;
+    };
 
 
 }