From 78f9af36272c7724463d3a2ce94cce0dbaefedac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hauke=20M=C3=B6nck?= <hauke_moenck@gmx.de> Date: Wed, 31 Oct 2018 14:50:00 +0000 Subject: [PATCH] Made methods virtual --- .../IModel/IModelTrackedTrajectory.h | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Src/Interfaces/IModel/IModelTrackedTrajectory.h b/Src/Interfaces/IModel/IModelTrackedTrajectory.h index 7d791a9..78ebd9b 100644 --- a/Src/Interfaces/IModel/IModelTrackedTrajectory.h +++ b/Src/Interfaces/IModel/IModelTrackedTrajectory.h @@ -57,29 +57,20 @@ public: */ virtual IModelTrackedComponent *getLastChild() = 0; - void setTime(std::chrono::system_clock::time_point t) { _time = t; }; - std::chrono::system_clock::time_point getTime() { return _time; }; + virtual void setTime(std::chrono::system_clock::time_point t) { _time = t; }; + virtual std::chrono::system_clock::time_point getTime() { return _time; }; + virtual QList<IModelTrackedComponent*> getChildNodes() = 0; + virtual void setChildNodes(QList<IModelTrackedComponent*> n) = 0; + virtual bool hasChildNodes() = 0; - QList<IModelTrackedComponent*> getChildNodes() { - return _TrackedComponents; - } - void setChildNodes(QList<IModelTrackedComponent*> n) { - _TrackedComponents = n; - } - bool hasChildNodes() { - return true; - } - - // ITrackedComponent interface public: - void operate(); - std::chrono::system_clock::time_point _time; + virtual void operate(); protected: static int nextID; + std::chrono::system_clock::time_point _time; - QList<IModelTrackedComponent*> _TrackedComponents; }; #endif // ITRACKEDOTRAJECTORY_H -- GitLab