Classes | |
class | ChronFileInterpolator |
class | ChronFileLinearInterpolator |
class | ChronologicalSerie |
class | ColumnTextParser |
class | ReaderNextValue |
class | DistributionBindings |
class | DistributionTables |
class | ExternalProgram |
class | FileDownloader |
struct | GDALDriverInfos_t |
class | ProgressiveChronFileReader |
class | ProgressiveColumnFileReader |
Typedefs | |
typedef std::pair < openfluid::core::DateTime, double > | ChronItem_t |
typedef std::map< std::string, GDALDriverInfos_t > | GDALDriversFilesExts_t |
Functions | |
const GDALDriversFilesExts_t DLLEXPORT | getOGRFilesDriversForOpenFLUID () |
const GDALDriversFilesExts_t DLLEXPORT | getGDALFilesDriversForOpenFLUID () |
const std::set< std::string > DLLEXPORT | getOGRFilesExtensionsForOpenFLUID () |
QString DLLEXPORT | toIniCompatible (const std::string &Str) |
std::string DLLEXPORT | fromIniCompatible (const QVariant &Var) |
std::list< std::string > DLLEXPORT | toStdStringList (const QStringList &StrList) |
QString DLLEXPORT | getOGRGDALFormatsForQFileDialogs (const GDALDriversFilesExts_t &Drivers, const QString &AllFormatsLabel) |
QString DLLEXPORT | escapeXMLEntities (const QString &Str) |
template<typename T > | |
bool | ConvertString (const std::string &StrToConvert, T *Converted) |
template<typename T > | |
bool | ConvertValue (const T ValueToConvert, std::string *StrConverted) |
void DLLEXPORT | TokenizeString (const std::string &StrToTokenize, std::vector< std::string > &Tokens, const std::string &Delimiters) |
bool | IsCloseEnough (double A, double B, double Epsilon=0.00001) |
bool | IsVeryClose (double A, double B, double Epsilon=0.00001) |
bool DLLEXPORT | WildcardMatching (const std::string &Pattern, const std::string &Str) |
std::vector< std::string > DLLEXPORT | GetFilesByExt (const std::string DirToExplore, const std::string Ext, bool WithPath=false, bool ExtIncludeDot=false) |
std::vector< std::string > DLLEXPORT | GetFilesBySuffixAndExt (const std::string &DirToExplore, const std::string &Suffix, const std::string &Ext, bool WithPath=false, bool ExtIncludeDot=false) |
std::vector< std::string > DLLEXPORT | SplitString (const std::string &StrToSplit, const std::string &Separators, bool ReturnsEmpty=false) |
bool DLLEXPORT | EmptyDirectoryRecursively (const std::string &DirPath) |
std::vector< std::string > DLLEXPORT | GetFilesRecursively (const std::string &DirPath) |
std::string DLLEXPORT | ReplaceEmptyString (std::string SourceStr, const std::string &ReplaceStr) |
std::string DLLEXPORT | RemoveTrailingSlashes (std::string Str) |
void DLLEXPORT | printSTDOUT (std::vector< std::string > Strings, std::string Sep) |
void DLLEXPORT | CopyDirectoryRecursively (const std::string &SourcePath, const std::string &IntoPath, const bool DontCopyDotDirs=false) |
void DLLEXPORT | CopyDirectoryContentsRecursively (const std::string &SourcePath, const std::string &IntoPath, const bool DontCopyDotDirs=false) |
int DLLEXPORT | CompareVersions (const std::string &VersionA, const std::string &VersionB, bool Strict=true) |
void DLLEXPORT | Sleep (const unsigned int MSec) |
typedef std::pair<openfluid::core::DateTime,double> openfluid::tools::ChronItem_t |
typedef std::map<std::string,GDALDriverInfos_t> openfluid::tools::GDALDriversFilesExts_t |
Map of drivercode => openfluid::tools::GDALDriverInfos_t
int DLLEXPORT openfluid::tools::CompareVersions | ( | const std::string & | VersionA, |
const std::string & | VersionB, | ||
bool | Strict = true |
||
) |
Compares two OpenFLUID software versions. Version number must be formed as major.minor.patch[~status]
[in] | VersionA | the first version number |
[in] | VersionB | the second version number |
[in] | Strict | If true, the comparison include the status part of the version (it ignores it otherwise) |
bool openfluid::tools::ConvertString | ( | const std::string & | StrToConvert, |
T * | Converted | ||
) | [inline] |
Converts a string to another type
[in] | StrToConvert | the string to convert |
[out] | Converted | the result of the conversion |
bool openfluid::tools::ConvertValue | ( | const T | ValueToConvert, |
std::string * | StrConverted | ||
) | [inline] |
Converts a value to a string
[in] | ValueToConvert | the value to convert |
[out] | StrConverted | the result of the conversion |
void DLLEXPORT openfluid::tools::CopyDirectoryContentsRecursively | ( | const std::string & | SourcePath, |
const std::string & | IntoPath, | ||
const bool | DontCopyDotDirs = false |
||
) |
Copies a source directory to destination path, not including the root of the source directory. If the destination path does not exists, it is created.
[in] | SourcePath | the source directory to copy |
[in] | IntoPath | the destination directory |
[in] | DontCopyDotDirs | flag for copying dot ('.*') directories. Default is false. |
void DLLEXPORT openfluid::tools::CopyDirectoryRecursively | ( | const std::string & | SourcePath, |
const std::string & | IntoPath, | ||
const bool | DontCopyDotDirs = false |
||
) |
Copies a source directory to destination path, including the root of the source directory. If the destination path does not exists, it is created.
[in] | SourcePath | the source directory to copy |
[in] | IntoPath | the destination directory |
[in] | DontCopyDotDirs | flag for copying dot ('.*') directories. Default is false. |
bool DLLEXPORT openfluid::tools::EmptyDirectoryRecursively | ( | const std::string & | DirPath | ) |
Recursively removes all files and directories contained in the given directory. It deletes the directory and recreates it.
[in] | DirPath | the directory to empty |
QString DLLEXPORT openfluid::tools::escapeXMLEntities | ( | const QString & | Str | ) |
Escapes characters in the given string to be compatible with the XML format.
[in] | Str | the string to escape |
std::string DLLEXPORT openfluid::tools::fromIniCompatible | ( | const QVariant & | Var | ) |
Transforms the given variable from an INI file managed with QSettings to a string
[in] | Var | the variable to transform |
std::vector<std::string> DLLEXPORT openfluid::tools::GetFilesByExt | ( | const std::string | DirToExplore, |
const std::string | Ext, | ||
bool | WithPath = false , |
||
bool | ExtIncludeDot = false |
||
) |
Gets the list of files with specified extension contained in the specified directory
[in] | DirToExplore | the directory to explore |
[in] | Ext | the file extension |
[in] | WithPath | return full path with file name if true, file name only otherwise |
[in] | ExtIncludeDot | if true, the given extension through Ext parameter is suffixed by a dot |
std::vector<std::string> DLLEXPORT openfluid::tools::GetFilesBySuffixAndExt | ( | const std::string & | DirToExplore, |
const std::string & | Suffix, | ||
const std::string & | Ext, | ||
bool | WithPath = false , |
||
bool | ExtIncludeDot = false |
||
) |
Get list of files with specified extension contained in the specified dir
[in] | DirToExplore | the directory to explore |
[in] | Ext | the file extension |
[in] | Suffix | the file suffix |
[in] | WithPath | return full path with file name if true, file name only otherwise |
[in] | ExtIncludeDot | if true, the given extension through Ext parameter is suffixed by a dot |
std::vector<std::string> DLLEXPORT openfluid::tools::GetFilesRecursively | ( | const std::string & | DirPath | ) |
Recursively finds all the paths of the files that exist exist in the given directory and subdirectories
[in] | DirPath | the directory to explore |
Returns a list of GDAL drivers available in OpenFLUID for GIS vector files
Returns a list of OGR drivers available in OpenFLUID for GIS vector files
const std::set<std::string> DLLEXPORT openfluid::tools::getOGRFilesExtensionsForOpenFLUID | ( | ) |
Returns a set of GIS vector files extensions available in OpenFLUID
QString DLLEXPORT openfluid::tools::getOGRGDALFormatsForQFileDialogs | ( | const GDALDriversFilesExts_t & | Drivers, |
const QString & | AllFormatsLabel | ||
) |
Returns the available GDAL/OGR formats as a QFileDialog formats string. The string is built according to GDAL/OGR available drivers. The OGRRegisterAll() and/or GDALAllRegister() instruction must be called before using this function.
[in] | Drivers | The available extensions list |
[in] | AllFormatsLabel | the label displayed for all formats |
bool openfluid::tools::IsCloseEnough | ( | double | A, |
double | B, | ||
double | Epsilon = 0.00001 |
||
) | [inline] |
Function for testing equality between two double precision floats, using the "close enough" method.
[in] | A | the firts term of the equality |
[in] | B | the firts term of the equality |
[in] | Epsilon | the comparison tolerance factor |
bool openfluid::tools::IsVeryClose | ( | double | A, |
double | B, | ||
double | Epsilon = 0.00001 |
||
) | [inline] |
Function for testing equality between two double precision floats, using the "very close" method.
[in] | A | the firts term of the equality |
[in] | B | the firts term of the equality |
[in] | Epsilon | the comparison tolerance factor |
void DLLEXPORT openfluid::tools::printSTDOUT | ( | std::vector< std::string > | Strings, |
std::string | Sep | ||
) |
std::string DLLEXPORT openfluid::tools::RemoveTrailingSlashes | ( | std::string | Str | ) |
Removes trailing slashes if any, useful for cleaning paths
[in] | Str | the string to process |
std::string DLLEXPORT openfluid::tools::ReplaceEmptyString | ( | std::string | SourceStr, |
const std::string & | ReplaceStr | ||
) |
Replaces a string by another string if it is empty
[in] | SourceStr | the source string to process |
[in] | ReplaceStr | the replacement string to use |
void DLLEXPORT openfluid::tools::Sleep | ( | const unsigned int | MSec | ) |
std::vector<std::string> DLLEXPORT openfluid::tools::SplitString | ( | const std::string & | StrToSplit, |
const std::string & | Separators, | ||
bool | ReturnsEmpty = false |
||
) |
Splits the passed string into a std::string array, split using the given SepString
[in] | StrToSplit | the string to split |
[in] | Separators | the string of separators used to split the string |
[in] | ReturnsEmpty | if true, the empty strings are returned |
QString DLLEXPORT openfluid::tools::toIniCompatible | ( | const std::string & | Str | ) |
Transforms the given string to a string compatible with the INI files managed with QSettings.
[in] | Str | the string to transform |
void DLLEXPORT openfluid::tools::TokenizeString | ( | const std::string & | StrToTokenize, |
std::vector< std::string > & | Tokens, | ||
const std::string & | Delimiters | ||
) |
Function for tokenizing string into a vector of tokens
[in] | StrToTokenize | the string to tokenize |
[out] | Tokens | the resulting tokens |
[in] | Delimiters | the string delimiter |
std::list<std::string> DLLEXPORT openfluid::tools::toStdStringList | ( | const QStringList & | StrList | ) |
Transforms a QStringList into a std::list of std::string
[in] | StrList | the QStringList to transform |
bool DLLEXPORT openfluid::tools::WildcardMatching | ( | const std::string & | Pattern, |
const std::string & | Str | ||
) |
Checks if the given string matches the given pattern, including * and ? wildcards
[in] | Pattern | The pattern to match |
[in] | Str | The string to test |