#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
virtual std::unique_ptr<Alarm> mir::time::AlarmFactory::create_alarm |
( |
std::unique_ptr< LockableCallback > |
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
The documentation for this class was generated from the following file:
Copyright © 2012-2016 Canonical Ltd.
Generated on Tue Oct 31 05:57:28 UTC 2017