#include <alarm_factory.h>
virtual mir::time::AlarmFactory::~AlarmFactory |
( |
| ) |
|
|
virtualdefault |
mir::time::AlarmFactory::AlarmFactory |
( |
| ) |
|
|
protecteddefault |
mir::time::AlarmFactory::AlarmFactory |
( |
AlarmFactory const & |
| ) |
|
|
protecteddelete |
virtual std::unique_ptr<Alarm> mir::time::AlarmFactory::create_alarm |
( |
std::function< void()> const & |
callback | ) |
|
|
pure virtual |
Create an Alarm that will not fire until scheduled.
- Parameters
-
callback | Function to call when the Alarm signals |
- Returns
- A handle to an Alarm that can later be scheduled
Implemented in mir::GLibMainLoop.
virtual std::unique_ptr<Alarm> mir::time::AlarmFactory::create_alarm |
( |
std::shared_ptr< LockableCallback > const & |
callback | ) |
|
|
pure virtual |
Create an Alarm that will not fire until scheduled.
A LockableCallback allows the user to preserve lock ordering in situations where Alarm methods need to be called under external lock and the callback implementation needs to run code protected by the same lock. An alarm implementation may have internal locks of its own, which maybe acquired during callback dispatching; to preserve lock ordering LockableCallback::lock is invoked during callback dispatch before any internal locks are acquired.
- Parameters
-
callback | Function to call when the Alarm signals |
- Returns
- A handle to an Alarm that can later be scheduled
Implemented in mir::GLibMainLoop.
The documentation for this class was generated from the following file:
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015