51 #include <visp/vpConfig.h>
58 #include <visp/vpColor.h>
159 static void getUserName(std::string &username);
160 static std::string getUserName();
161 static std::string getenv(
const char *env);
162 static std::string getenv(
const std::string &env);
163 static std::string getViSPImagesDataPath();
164 static void getVersion(
const std::string &version,
unsigned int &major,
unsigned int &minor,
unsigned int &patch);
165 static bool checkDirectory(
const char *dirname);
166 static bool checkDirectory(
const std::string &dirname);
167 static bool checkFilename(
const char *filename);
168 static bool checkFilename(
const std::string &filename);
169 static bool copy(
const char *src,
const char *dst);
170 static bool copy(
const std::string &src,
const std::string &dst);
171 static void makeDirectory(
const char *dirname);
172 static void makeDirectory(
const std::string &dirname);
173 static bool remove(
const char *filename);
174 static bool remove(
const std::string &filename);
175 static bool rename(
const char *oldfilename,
const char *newfilename);
176 static bool rename(
const std::string &oldfilename,
const std::string &newfilename);
178 static std::string path(
const char * pathname);
179 static std::string path(
const std::string &pathname);
184 static const char separator =
191 static std::string getFileExtension(
const std::string &pathname,
const bool checkFile=
false);
192 static std::string getName(
const std::string &pathname);
193 static std::string getNameWE(
const std::string &pathname);
194 static std::string getParent(
const std::string& pathname);
195 static std::string createFilePath(
const std::string& parent,
const std::string child);
196 static bool isAbsolutePathname(
const std::string& pathname);
197 static std::pair<std::string, std::string> splitDrive(
const std::string& pathname);
200 static bool loadConfigFile(
const std::string &confFile);
201 static bool readConfigVar(
const std::string &var,
float &value);
202 static bool readConfigVar(
const std::string &var,
double &value);
203 static bool readConfigVar(
const std::string &var,
int &value);
204 static bool readConfigVar(
const std::string &var,
unsigned int &value);
205 static bool readConfigVar(
const std::string &var,
bool &value);
206 static bool readConfigVar(
const std::string &var, std::string &value);
207 static bool readConfigVar(
const std::string &var,
vpColor &value);
208 static bool readConfigVar(
const std::string &var,
vpMatrix &value,
209 const unsigned int &nCols = 0,
210 const unsigned int &nRows = 0);
218 inline static void setBaseName(
const std::string &s) {baseName = s;}
224 static inline void setBaseDir(
const std::string &dir) {baseDir = dir +
"/";}
225 static void addNameElement(
const std::string &strTrue,
226 const bool &cond=
true,
227 const std::string &strFalse=
"");
228 static void addNameElement(
const std::string &strTrue,
const double &val);
240 inline static std::string
getFullName() {
return baseDir + baseName;}
243 static void saveConfigFile(
const bool &actuallySave =
true);
244 static void createBaseNamePath(
const bool &empty =
false);
Definition of the vpMatrix class.
Class to define colors available for display functionnalities.