Last change
on this file since 5eb3f65 was
5eb3f65,
checked in by Peter A. Buhr <pabuhr@…>, 4 months ago
|
change enumeration function names labelE, valueE, posE to label, value, posn
|
-
Property mode set to
100644
|
File size:
708 bytes
|
Rev | Line | |
---|
[c333ed2] | 1 | #include "enum.hfa" |
---|
[85855b0] | 2 | #include "fstream.hfa" |
---|
[c333ed2] | 3 | |
---|
[03ac869] | 4 | #pragma GCC visibility push(default) |
---|
| 5 | |
---|
[85855b0] | 6 | forall(ostype & | basic_ostream(ostype), E, V| CfaEnum(E, V)) |
---|
| 7 | ostype & ?|?(ostype& os, E e) { |
---|
[5eb3f65] | 8 | return os | type_name(e) | "." | label(e); |
---|
[85855b0] | 9 | } |
---|
[c333ed2] | 10 | |
---|
[85855b0] | 11 | forall(ostype & | basic_ostream(ostype), E| CfaEnum(E, quasi_void)) |
---|
| 12 | ostype & ?|?(ostype& os, E e) { |
---|
[5eb3f65] | 13 | return os | type_name(e) | "." | label(e); |
---|
[41c8312] | 14 | } |
---|
[525f7ad] | 15 | |
---|
| 16 | forall(ostype & | basic_ostream(ostype), E, V| CfaEnum(E, V)) { |
---|
[5eb3f65] | 17 | int ?==?(E l, E r) { return posn(l) == posn(r); } |
---|
| 18 | int ?<=?(E l, E r) { return posn(l) <= posn(r); } |
---|
| 19 | int ?>=?(E l, E r) { return posn(l) >= posn(r); } |
---|
| 20 | int ?<?(E l, E r) { return posn(l) < posn(r); } |
---|
| 21 | int ?>?(E l, E r) { return posn(l) > posn(r); } |
---|
[525f7ad] | 22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.