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