root/trunk/Serial/Interface.d
| Revision 591, 340 bytes (checked in by BCS, 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | module Interface; |
| 2 | |
| 3 | interface Sink(T) |
| 4 | { |
| 5 | static assert(is(T == char) || is(T == byte)); |
| 6 | void Dump(T); |
| 7 | void Dump(T[]); |
| 8 | } |
| 9 | |
| 10 | interface Source(T) |
| 11 | { |
| 12 | static assert(is(T == char) || is(T == byte)); |
| 13 | bool Peek(T t); |
| 14 | bool Peek(T[] ts); |
| 15 | T Peek(); |
| 16 | bool Pick(ref T t, bool must = false); |
| 17 | bool Pick(T[] ts, bool must = true); |
| 18 | } |
Note: See TracBrowser for help on using the browser.
