1 #include <msp/strings/format.h>
2 #include "effectcolor.h"
7 void operator>>(const LexicalConverter &conv, EffectColor &color)
9 const string &str = conv.get();
20 else if(str=="Yellow")
23 throw lexical_error(format("Conversion of %s to EffectColor", str));
26 void operator<<(LexicalConverter &conv, EffectColor color)
30 case WHITE: conv.result("White"); return;
31 case RED: conv.result("Red"); return;
32 case GREEN: conv.result("Green"); return;
33 case BLUE: conv.result("Blue"); return;
34 case BROWN: conv.result("Brown"); return;
35 case YELLOW: conv.result("Yellow"); return;
36 default: conv.result(format("EffectColor(%d)", static_cast<int>(color))); return;