00001 #include "osl/direction.h"
00002 #include <iostream>
00003
00004 bool osl::isValid(Direction d){
00005 return DIRECTION_MIN<=d && d<=DIRECTION_MAX;
00006 }
00007
00008 namespace osl
00009 {
00010 std::ostream& operator<<(std::ostream& os,const Direction d){
00011 static const char* names[]={
00012 "UL","U","UR","L","R","DL","D","DR","UUL","UUR","LONG_UL",
00013 "LONG_U","LONG_UR","LONG_L","LONG_R","LONG_DL","LONG_D","LONG_DR"
00014 };
00015 return os << names[static_cast<int>(d)];
00016 }
00017
00018 }
00019
00020
00021
00022
00023