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",
00013 "R","DL","D","DR",
00014 "UUL","UUR","LONG_UL",
00015 "LONG_U","LONG_UR","LONG_L",
00016 "LONG_R","LONG_DL","LONG_D","LONG_DR"
00017 };
00018 return os << names[static_cast<int>(d)];
00019 }
00020
00021 }
00022
00023
00024
00025
00026