Overall: what is the purpose of this alarm factory? I presume it's to get key-repeat timers that are dispatched appropriately?
Nit:
+ struct Alarm;
+ struct AlarmData;
Both of these have significant interfaces and significant internal state; is there any reason why they're not declared as classes? Relatedly: C++ *really* should have not introduced the “class” keyword.
The code looks fine, although you should add documentation for the new public interfaces.
Overall: what is the purpose of this alarm factory? I presume it's to get key-repeat timers that are dispatched appropriately?
Nit:
+ struct Alarm;
+ struct AlarmData;
Both of these have significant interfaces and significant internal state; is there any reason why they're not declared as classes? Relatedly: C++ *really* should have not introduced the “class” keyword.
The code looks fine, although you should add documentation for the new public interfaces.