summaryrefslogtreecommitdiff
path: root/src/utils/timed_events.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-05-30 15:51:43 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-05-30 15:51:43 +0200
commit5c9d2c23ba6a401bc9494a6023491bbf3ade8d34 (patch)
tree050ea0cafc49cbdbc75dede85770aa28440d60dd /src/utils/timed_events.hpp
parent5cca518c2d946144f4fee1b15dcfd3884850dcb1 (diff)
downloadbiboumi-5c9d2c23ba6a401bc9494a6023491bbf3ade8d34.tar.gz
biboumi-5c9d2c23ba6a401bc9494a6023491bbf3ade8d34.tar.bz2
biboumi-5c9d2c23ba6a401bc9494a6023491bbf3ade8d34.tar.xz
biboumi-5c9d2c23ba6a401bc9494a6023491bbf3ade8d34.zip
TimedEventsManager is now a singleton
Diffstat (limited to 'src/utils/timed_events.hpp')
-rw-r--r--src/utils/timed_events.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/timed_events.hpp b/src/utils/timed_events.hpp
index f601cae..aafe532 100644
--- a/src/utils/timed_events.hpp
+++ b/src/utils/timed_events.hpp
@@ -83,9 +83,12 @@ private:
class TimedEventsManager
{
public:
- explicit TimedEventsManager();
~TimedEventsManager();
/**
+ * Return the unique instance of this class
+ */
+ static TimedEventsManager& instance();
+ /**
* Add an event to the list of managed events. The list is sorted after
* this call.
*/
@@ -117,6 +120,7 @@ public:
std::size_t size() const;
private:
+ explicit TimedEventsManager();
std::list<TimedEvent> events;
TimedEventsManager(const TimedEventsManager&) = delete;
TimedEventsManager(TimedEventsManager&&) = delete;