47 #include <visp3/core/vpConfig.h>
54 #include <visp3/core/vpColor.h>
155 static void getUserName(std::string &username);
156 static std::string getUserName();
157 static std::string getenv(
const char *env);
158 static std::string getenv(
const std::string &env);
159 static std::string getViSPImagesDataPath();
160 static void getVersion(
const std::string &version,
unsigned int &major,
unsigned int &minor,
unsigned int &patch);
161 static bool checkDirectory(
const char *dirname);
162 static bool checkDirectory(
const std::string &dirname);
163 static bool checkFilename(
const char *filename);
164 static bool checkFilename(
const std::string &filename);
165 static bool copy(
const char *src,
const char *dst);
166 static bool copy(
const std::string &src,
const std::string &dst);
167 static void makeDirectory(
const char *dirname);
168 static void makeDirectory(
const std::string &dirname);
169 static bool remove(
const char *filename);
170 static bool remove(
const std::string &filename);
171 static bool rename(
const char *oldfilename,
const char *newfilename);
172 static bool rename(
const std::string &oldfilename,
const std::string &newfilename);
174 static std::string path(
const char * pathname);
175 static std::string path(
const std::string &pathname);
180 static const char separator =
187 static std::string getFileExtension(
const std::string &pathname,
const bool checkFile=
false);
188 static std::string getName(
const std::string &pathname);
189 static std::string getNameWE(
const std::string &pathname);
190 static std::string getParent(
const std::string& pathname);
191 static std::string createFilePath(
const std::string& parent,
const std::string child);
192 static bool isAbsolutePathname(
const std::string& pathname);
193 static std::pair<std::string, std::string> splitDrive(
const std::string& pathname);
194 static std::vector<std::string> splitChain(
const std::string & chain,
const std::string & sep);
201 static bool loadConfigFile(
const std::string &confFile);
202 static bool readConfigVar(
const std::string &var,
float &value);
203 static bool readConfigVar(
const std::string &var,
double &value);
204 static bool readConfigVar(
const std::string &var,
int &value);
205 static bool readConfigVar(
const std::string &var,
unsigned int &value);
206 static bool readConfigVar(
const std::string &var,
bool &value);
207 static bool readConfigVar(
const std::string &var, std::string &value);
208 static bool readConfigVar(
const std::string &var,
vpColor &value);
210 const unsigned int &nCols = 0,
211 const unsigned int &nRows = 0);
214 static void setBaseName(
const std::string &s);
215 static void setBaseDir(
const std::string &dir);
216 static void addNameElement(
const std::string &strTrue,
217 const bool &cond=
true,
218 const std::string &strFalse=
"");
219 static void addNameElement(
const std::string &strTrue,
const double &val);
220 static std::string getBaseName();
221 static std::string getFullName();
224 static void saveConfigFile(
const bool &actuallySave =
true);
225 static void createBaseNamePath(
const bool &empty =
false);
Class to define colors available for display functionnalities.