Sketch the missing driver API functions and avoid virtual function calls.
The individual interface getters are now overridden in the final sub classes to avoid virtual calls whenever the final type is used.
This commit is contained in:
parent
b1663cc472
commit
3868ee64ce
4 changed files with 41 additions and 9 deletions
|
@ -12,6 +12,7 @@ interface EventDriver {
|
|||
@property EventDriverSockets sockets();
|
||||
@property EventDriverTimers udp();
|
||||
@property EventDriverEvents events();
|
||||
@property EventDriverSignals signals();
|
||||
@property EventDriverWatchers watchers();
|
||||
}
|
||||
|
||||
|
@ -143,6 +144,12 @@ interface EventDriverEvents {
|
|||
void cancelWaitForEvent(EventID event, EventCallback on_event);
|
||||
}
|
||||
|
||||
interface EventDriverSignals {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
//void waitForSignal(int sig, SignalCallback on_signal);
|
||||
//void cancelWaitForSignal(sig);
|
||||
}
|
||||
|
||||
interface EventDriverTimers {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
/**
|
||||
|
@ -168,7 +175,9 @@ interface EventDriverTimers {
|
|||
|
||||
interface EventDriverWatchers {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
|
||||
//WatcherID watchDirectory(Path path, bool recursive);
|
||||
//void waitForChanges(WatcherID watcher, FileChangesCallback callback);
|
||||
//void cancelWaitForChanges(WatcherID watcher);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue