direction.cc
Go to the documentation of this file.
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 // ;;; Local Variables:
00024 // ;;; mode:c++
00025 // ;;; c-basic-offset:2
00026 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines