00001 00008 #ifndef _SHAPE_H 00009 #define _SHAPE_H 00010 00011 #include "main.h" 00012 00013 enum Shape { 00014 SHAPE_BOX, 00015 SHAPE_SPHERE, 00016 SHAPE_CYLINDER 00017 }; 00018 00019 inline string to_string( Shape s ) 00020 { 00021 switch ( s ) { 00022 case SHAPE_BOX: return "box"; 00023 case SHAPE_SPHERE: return "sphere"; 00024 case SHAPE_CYLINDER: return "cylinder"; 00025 } 00026 return ""; 00027 } 00028 00029 #endif // header guard