47 #include <visp3/core/vpConfig.h> 54 #include <visp3/core/vpColor.h> 160 static const std::string &getBuildInformation();
161 static void getUserName(std::string &username);
162 static std::string getUserName();
163 static std::string getenv(
const char *env);
164 static std::string getenv(
const std::string &env);
165 static std::string getViSPImagesDataPath();
166 static void getVersion(
const std::string &version,
unsigned int &major,
unsigned int &minor,
unsigned int &patch);
167 static bool checkDirectory(
const char *dirname);
168 static bool checkDirectory(
const std::string &dirname);
169 static bool checkFilename(
const char *filename);
170 static bool checkFilename(
const std::string &filename);
171 static bool copy(
const char *src,
const char *dst);
172 static bool copy(
const std::string &src,
const std::string &dst);
173 static void makeDirectory(
const char *dirname);
174 static void makeDirectory(
const std::string &dirname);
175 static bool remove(
const char *filename);
176 static bool remove(
const std::string &filename);
177 static bool rename(
const char *oldfilename,
const char *newfilename);
178 static bool rename(
const std::string &oldfilename,
const std::string &newfilename);
180 static std::string path(
const char *pathname);
181 static std::string path(
const std::string &pathname);
187 static const char separator =
194 static std::string getAbsolutePathname(
const std::string &pathname);
195 static std::string getFileExtension(
const std::string &pathname,
const bool checkFile =
false);
196 static std::string getName(
const std::string &pathname);
197 static std::string getNameWE(
const std::string &pathname);
198 static std::string getParent(
const std::string &pathname);
199 static std::string createFilePath(
const std::string &parent,
const std::string &child);
200 static bool isAbsolutePathname(
const std::string &pathname);
201 static bool isSamePathname(
const std::string &pathname1,
const std::string &pathname2);
202 static std::pair<std::string, std::string> splitDrive(
const std::string &pathname);
203 static std::vector<std::string> splitChain(
const std::string &chain,
const std::string &sep);
204 static std::vector<std::string> getDirFiles(
const std::string &dirname);
211 static bool loadConfigFile(
const std::string &confFile);
212 static bool readConfigVar(
const std::string &var,
float &value);
213 static bool readConfigVar(
const std::string &var,
double &value);
214 static bool readConfigVar(
const std::string &var,
int &value);
215 static bool readConfigVar(
const std::string &var,
unsigned int &value);
216 static bool readConfigVar(
const std::string &var,
bool &value);
217 static bool readConfigVar(
const std::string &var, std::string &value);
218 static bool readConfigVar(
const std::string &var,
vpColor &value);
219 static bool readConfigVar(
const std::string &var,
vpArray2D<double> &value,
const unsigned int &nCols = 0,
220 const unsigned int &nRows = 0);
223 static void setBaseName(
const std::string &s);
224 static void setBaseDir(
const std::string &dir);
225 static void addNameElement(
const std::string &strTrue,
const bool &cond =
true,
const std::string &strFalse =
"");
226 static void addNameElement(
const std::string &strTrue,
const double &val);
227 static std::string getBaseName();
228 static std::string getFullName();
231 static void saveConfigFile(
const bool &actuallySave =
true);
232 static void createBaseNamePath(
const bool &empty =
false);
235 static void readBinaryValueLE(std::ifstream &file, int16_t &short_value);
236 static void readBinaryValueLE(std::ifstream &file, uint16_t &ushort_value);
237 static void readBinaryValueLE(std::ifstream &file, int32_t &int_value);
238 static void readBinaryValueLE(std::ifstream &file, uint32_t &int_value);
239 static void readBinaryValueLE(std::ifstream &file,
float &float_value);
240 static void readBinaryValueLE(std::ifstream &file,
double &double_value);
242 static void writeBinaryValueLE(std::ofstream &file,
const int16_t short_value);
243 static void writeBinaryValueLE(std::ofstream &file,
const uint16_t ushort_value);
244 static void writeBinaryValueLE(std::ofstream &file,
const int32_t int_value);
245 static void writeBinaryValueLE(std::ofstream &file,
const uint32_t int_value);
246 static void writeBinaryValueLE(std::ofstream &file,
const float float_value);
247 static void writeBinaryValueLE(std::ofstream &file,
const double double_value);
256 static int mkdir_p(
const char *path,
const int mode);
Class to define colors available for display functionnalities.