00001 /** 00002 * @file Location.h 00003 * 00004 * Definiton of class Location. 00005 * 00006 * @author Max Risler 00007 */ 00008 #ifndef __Location_h__ 00009 #define __Location_h__ 00010 00011 #include "Platform/SystemCall.h" 00012 00013 class Location; 00014 00015 /** 00016 * Returns a reference to the location configuration 00017 */ 00018 Location& getLocation(); 00019 00020 /** 00021 * Class for location dependent configuration 00022 */ 00023 class Location 00024 { 00025 public: 00026 /** constructor */ 00027 Location(); 00028 00029 /** returns the filename and relative path to a given configuration file 00030 * without the robotdesign-prefix in the path (root of the location) 00031 */ 00032 const char* getFilename(const char *file); 00033 00034 /** returns the filename and relative path to a given configuration file 00035 * for the current robotdesign-prefix 00036 */ 00037 const char* getModelFilename(const char *file); 00038 00039 /** returns the filename and relative path to a given configuration file 00040 * and given robotdesign 00041 */ 00042 const char* getModelFilename(const char *file, RobotDesign::Design design); 00043 00044 /** returns the name of the location */ 00045 const char* getName() const 00046 { 00047 return name; 00048 } 00049 00050 private: 00051 /** the name of the location */ 00052 char name[100]; 00053 00054 char filename[100]; 00055 }; 00056 00057 #endif // __Location_h_ 00058 00059 /* 00060 * Change log : 00061 * 00062 * $Log: Location.h,v $ 00063 * Revision 1.3 2004/05/27 12:28:33 thomas 00064 * added function to get specific config-files for a given robotdesign 00065 * 00066 * Revision 1.2 2004/05/27 10:08:09 thomas 00067 * added model-specific locations 00068 * 00069 * Revision 1.1.1.1 2004/05/22 17:35:53 cvsadm 00070 * created new repository GT2004_WM 00071 * 00072 * Revision 1.1 2003/10/07 10:13:21 cvsadm 00073 * Created GT2004 (M.J.) 00074 * 00075 * Revision 1.1.1.1 2003/07/02 09:40:28 cvsadm 00076 * created new repository for the competitions in Padova from the 00077 * tamara CVS (Tuesday 2:00 pm) 00078 * 00079 * removed unused solutions 00080 * 00081 * Revision 1.1 2003/05/11 17:03:00 risler 00082 * added location.cfg 00083 * 00084 */