#include <alarm_factory.h>
◆ ~AlarmFactory()
virtual mir::time::AlarmFactory::~AlarmFactory |
( |
| ) |
|
|
virtualdefault |
◆ AlarmFactory() [1/2]
mir::time::AlarmFactory::AlarmFactory |
( |
| ) |
|
|
protecteddefault |
◆ AlarmFactory() [2/2]
mir::time::AlarmFactory::AlarmFactory |
( |
AlarmFactory const & |
| ) |
|
|
protecteddelete |
◆ create_alarm() [1/2]
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
◆ create_alarm() [2/2]
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
◆ operator=()
The documentation for this class was generated from the following file:
Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:07:25 UTC 2017