00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef BALL_COMMON_PATH_H
00011 #define BALL_COMMON_PATH_H
00012
00013 #ifndef BALL_CONFIG_CONFIG_H
00014 # include <BALL/CONFIG/config.h>
00015 #endif
00016
00017 #ifndef BALL_COMMON_GLOBAL_H
00018 # include <BALL/COMMON/global.h>
00019 #endif
00020
00021 #include <string>
00022 #include <vector>
00023 using std::string;
00024 using std::vector;
00025
00026
00027 namespace BALL
00028 {
00037 class BALL_EXPORT Path
00038 {
00039 public:
00043
00046 Path();
00048
00066 string getDataPath();
00067
00072 void setDataPath(const string& path);
00073
00077 void addDataPath(const string& path);
00078
00083 string getDefaultDataPath();
00084
00097 string find(const string& name);
00098
00102 string findStrict(const string& name);
00103
00105 void reset();
00106
00107
00108 protected:
00109
00110 void buildPathArray_();
00111
00112 static string path_;
00113 static bool path_array_valid_;
00114 static bool environment_checked_;
00115 static std::vector<std::string> path_array_;
00116 static bool initialized_;
00117 };
00118
00119 }
00120
00121
00122 #endif // BALL_COMMON_PATH_H