1 #include <msp/strings/format.h>
10 void operator>>(const LexicalConverter &conv, Predicate &pred)
12 const string &str = conv.get();
15 else if(str=="ALWAYS")
19 else if(str=="LEQUAL")
23 else if(str=="GREATER")
25 else if(str=="GEQUAL")
27 else if(str=="NOTEQUAL")
30 throw lexical_error(format("conversion of '%s' to Predicate", str));
33 void operator<<(LexicalConverter &conv, Predicate pred)
37 case NEVER: conv.result("NEVER"); break;
38 case ALWAYS: conv.result("ALWAYS"); break;
39 case LESS: conv.result("LESS"); break;
40 case LEQUAL: conv.result("LEQUAL"); break;
41 case EQUAL: conv.result("EQUAL"); break;
42 case GREATER: conv.result("GREATER"); break;
43 case GEQUAL: conv.result("GEQUAL"); break;
44 case NOTEQUAL: conv.result("NOTEQUAL"); break;
45 default: conv.result(format("Predicate(%#x)", static_cast<int>(pred))); break;