diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-01-10 18:37:40 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-01-10 18:37:40 +0000 |
commit | 5fe329fe40c296a4a3dce9bc5543419ac954e4b0 (patch) | |
tree | 5fac3b692fecc7899f8c746e2116cdf6e2eee7b1 /yage/engine | |
parent | a62fbea8d40f623ffcd60eced63f295cd55db084 (diff) | |
download | YAGE-5fe329fe40c296a4a3dce9bc5543419ac954e4b0.tar.gz YAGE-5fe329fe40c296a4a3dce9bc5543419ac954e4b0.zip |
[Engine] [Docs] Adding documentation and continuing work on ECS.
Diffstat (limited to 'yage/engine')
-rw-r--r-- | yage/engine/system.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/yage/engine/system.h b/yage/engine/system.h index c63b4733..32d6fc34 100644 --- a/yage/engine/system.h +++ b/yage/engine/system.h @@ -18,21 +18,34 @@ namespace yage class System { public: - /// Virtual destructor to destroy all the objects that implement this - /// properly. + /** + * Virtual destructor to destroy all the objects that implement this + * properly. + */ virtual ~System() = 0; - /// Initializes the system. Good practice to have this function instead - /// using the constructor. + /** + * Initializes the system. Good practice to have this function instead + * using the constructor. + */ virtual void init() = 0; - /// Updates the system at each interval using the time step. + /** + * Updates the system at each interval using the time step. + * + * @param dt The time difference between the previous frame and the current one. + */ virtual void update(double dt) = 0; }; -/// Implement the default destructor, but leaving it as purely virtual in the -/// definition of the abstract class. -inline yage::System::~System() {} +/** + * Implement the default destructor, but leaving it as purely virtual in the + * definition of the abstract class. This is so that the classes that implement + * the abstract class have to implement a desctructor, but at the same time, + * that there is no undefined behavious when the stack unwinds to the system and + * calls the system destructor. + */ +inline System::~System() {} } // namespace yage |