47 #include <visp3/core/vpConfig.h> 54 #include <visp3/core/vpColor.h> 159 static const std::string &getBuildInformation();
160 static void getUserName(std::string &username);
161 static std::string getUserName();
162 static std::string getenv(
const char *env);
163 static std::string getenv(
const std::string &env);
164 static std::string getViSPImagesDataPath();
165 static void getVersion(
const std::string &version,
unsigned int &major,
unsigned int &minor,
unsigned int &patch);
166 static bool checkDirectory(
const char *dirname);
167 static bool checkDirectory(
const std::string &dirname);
168 static bool checkFilename(
const char *filename);
169 static bool checkFilename(
const std::string &filename);
170 static bool copy(
const char *src,
const char *dst);
171 static bool copy(
const std::string &src,
const std::string &dst);
172 static void makeDirectory(
const char *dirname);
173 static void makeDirectory(
const std::string &dirname);
174 static bool remove(
const char *filename);
175 static bool remove(
const std::string &filename);
176 static bool rename(
const char *oldfilename,
const char *newfilename);
177 static bool rename(
const std::string &oldfilename,
const std::string &newfilename);
179 static std::string path(
const char *pathname);
180 static std::string path(
const std::string &pathname);
186 static const char separator =
193 static std::string getAbsolutePathname(
const std::string &pathname);
194 static std::string getFileExtension(
const std::string &pathname,
const bool checkFile =
false);
195 static std::string getName(
const std::string &pathname);
196 static std::string getNameWE(
const std::string &pathname);
197 static std::string getParent(
const std::string &pathname);
198 static std::string createFilePath(
const std::string &parent,
const std::string &child);
199 static bool isAbsolutePathname(
const std::string &pathname);
200 static bool isSamePathname(
const std::string &pathname1,
const std::string &pathname2);
201 static std::pair<std::string, std::string> splitDrive(
const std::string &pathname);
202 static std::vector<std::string> splitChain(
const std::string &chain,
const std::string &sep);
203 static std::vector<std::string> getDirFiles(
const std::string &dirname);
210 static bool loadConfigFile(
const std::string &confFile);
211 static bool readConfigVar(
const std::string &var,
float &value);
212 static bool readConfigVar(
const std::string &var,
double &value);
213 static bool readConfigVar(
const std::string &var,
int &value);
214 static bool readConfigVar(
const std::string &var,
unsigned int &value);
215 static bool readConfigVar(
const std::string &var,
bool &value);
216 static bool readConfigVar(
const std::string &var, std::string &value);
217 static bool readConfigVar(
const std::string &var,
vpColor &value);
218 static bool readConfigVar(
const std::string &var,
vpArray2D<double> &value,
const unsigned int &nCols = 0,
219 const unsigned int &nRows = 0);
222 static void setBaseName(
const std::string &s);
223 static void setBaseDir(
const std::string &dir);
224 static void addNameElement(
const std::string &strTrue,
const bool &cond =
true,
const std::string &strFalse =
"");
225 static void addNameElement(
const std::string &strTrue,
const double &val);
226 static std::string getBaseName();
227 static std::string getFullName();
230 static void saveConfigFile(
const bool &actuallySave =
true);
231 static void createBaseNamePath(
const bool &empty =
false);
241 static int mkdir_p(
const char *path,
const int mode);
Class to define colors available for display functionnalities.