blob: c63b4733027a306342dc9d0cbe5ea59ec4a3f6f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/** ---------------------------------------------------------------------------
* @file: system.h
*
* Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
* MIT License, see LICENSE file for more details.
* ----------------------------------------------------------------------------
*/
#ifndef YAGE_ENGINE_SYSTEM_H
#define YAGE_ENGINE_SYSTEM_H
namespace yage
{
/**
* System interface for the different systems in the engine.
*/
class System
{
public:
/// 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.
virtual void init() = 0;
/// Updates the system at each interval using the time step.
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() {}
} // namespace yage
#endif
|