![]() |
Classes | |
class | ChronFileInterpolator |
class | ChronFileLinearInterpolator |
class | ChronologicalSerie |
class | ColumnTextParser |
class | Console |
class | DistributionBindings |
class | DistributionTables |
class | FileLogger |
class | Filesystem |
class | ProgressiveChronFileReader |
class | ProgressiveColumnFileReader |
class | ReaderNextValue |
Typedefs | |
typedef std::pair< openfluid::core::DateTime, double > | ChronItem_t |
Functions | |
template<typename T > | |
bool | convertString (const std::string &StrToConvert, T *Converted) |
template<typename T > | |
T | convertString (const std::string &StrToConvert) |
template<typename T > | |
bool | ConvertString (const std::string &StrToConvert, T *Converted) |
template<typename T > | |
bool | convertValue (const T &ValueToConvert, std::string *StrConverted) |
template<typename T > | |
std::string | convertValue (const T &ValueToConvert) |
template<typename T > | |
bool | ConvertValue (const T &ValueToConvert, std::string *StrConverted) |
void OPENFLUID_API | tokenizeString (const std::string &StrToTokenize, std::vector< std::string > &Tokens, const std::string &Delimiters) |
void | TokenizeString (const std::string &StrToTokenize, std::vector< std::string > &Tokens, const std::string &Delimiters) |
std::vector< std::string > OPENFLUID_API | splitString (const std::string &StrToSplit, const std::string &Separators, bool ReturnsEmpty=false) |
std::vector< std::string > | SplitString (const std::string &StrToSplit, const std::string &Separators, bool ReturnsEmpty=false) |
std::vector< std::string > OPENFLUID_API | findFilesByExtension (const std::string &Path, const std::string &Ext, bool WithPath=false, bool ExtIncludeDot=false) |
std::vector< std::string > OPENFLUID_API | findFilesBySuffixAndExtension (const std::string &Path, const std::string &Suffix, const std::string &Ext, bool WithPath=false, bool ExtIncludeDot=false) |
std::vector< std::string > OPENFLUID_API | findDirectories (const std::string &Path, bool WithPath=false) |
bool OPENFLUID_API | emptyDirectoryRecursively (const std::string &Path) |
void OPENFLUID_API | copyDirectoryContentsRecursively (const std::string &SrcPath, const std::string &DestPath, const bool DontCopyDotDirs=false) |
std::string OPENFLUID_API | classIDToString (const openfluid::core::UnitsClass_t &Class, openfluid::core::UnitID_t ID) |
bool OPENFLUID_API | isValidAlphaNumName (const std::string &Name) |
bool OPENFLUID_API | isValidWareID (const openfluid::ware::WareID_t &ID) |
bool OPENFLUID_API | isValidVariableName (const openfluid::core::VariableName_t &Name) |
bool OPENFLUID_API | isValidTypedVariableName (const openfluid::core::VariableName_t &Name) |
bool OPENFLUID_API | isValidAttributeName (const openfluid::core::AttributeName_t &Name) |
bool OPENFLUID_API | extractVariableNameAndType (const openfluid::core::VariableName_t &Name, openfluid::core::VariableName_t &VarName, openfluid::core::Value::Type &VarType) |
bool OPENFLUID_API | matchWithWildcard (const std::string &Pattern, const std::string &Str) |
std::string OPENFLUID_API | replaceEmptyString (std::string SourceStr, const std::string &ReplaceStr) |
std::string OPENFLUID_API | removeTrailingSlashes (const std::string &Str) |
int OPENFLUID_API | compareVersions (const std::string &VersionA, const std::string &VersionB, bool Strict=true) |
void OPENFLUID_API | millisleep (const unsigned long MSec) |
void OPENFLUID_API | microsleep (const unsigned long USec) |
std::string OPENFLUID_API | generatePseudoUniqueIdentifier (const unsigned int Length) |
void OPENFLUID_API | splitDuration (long int MSecsDuration, int &Days, int &Hours, int &Minutes, int &Seconds, int &MSecs) |
std::string OPENFLUID_API | getDurationAsPrettyString (long int MSecsDuration) |
QString OPENFLUID_API | toIniCompatible (const std::string &Str) |
std::string OPENFLUID_API | fromIniCompatible (const QVariant &Var) |
std::list< std::string > OPENFLUID_API | toStdStringList (const QStringList &StrList) |
std::vector< std::string > | toStdStringVector (const QStringList &StrList) |
QDateTime OPENFLUID_API | toQDateTime (const openfluid::core::DateTime &DT) |
QStringList OPENFLUID_API | toQStringList (const std::vector< std::string > &StrVect) |
QStringList OPENFLUID_API | toQStringList (const std::set< std::string > &StrSet) |
QStringList OPENFLUID_API | toQStringList (const std::list< std::string > &StrList) |
QStringList OPENFLUID_API | toQStringList (const std::set< int > &IntSet) |
QString OPENFLUID_API | escapeXMLEntities (const QString &Str) |
QString OPENFLUID_API | decodeXMLEntities (const QString &Str) |
typedef std::pair<openfluid::core::DateTime,double> openfluid::tools::ChronItem_t |
std::string OPENFLUID_API openfluid::tools::classIDToString | ( | const openfluid::core::UnitsClass_t & | Class, |
openfluid::core::UnitID_t | ID | ||
) |
Generates string from class and ID of a spatial unit using the "Class#ID" pattern.
[in] | Class | The units class |
[in] | ID | The unit ID |
int OPENFLUID_API 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) |
|
inline |
Converts a string to another type
[in] | StrToConvert | the string to convert |
[out] | Converted | the result of the conversion |
|
inline |
Converts a string to another type
[in] | StrToConvert | the string to convert |
openfluid::base::FrameworkException | Error in string conversion |
|
inline |
|
inline |
Converts a value to a string
[in] | ValueToConvert | the value to convert |
[out] | StrConverted | the result of the conversion |
|
inline |
Converts a value to a string
[in] | ValueToConvert | the value to convert |
openfluid::base::FrameworkException | Error in value conversion |
|
inline |
void OPENFLUID_API openfluid::tools::copyDirectoryContentsRecursively | ( | const std::string & | SrcPath, |
const std::string & | DestPath, | ||
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] | SrcPath | the source directory to copy |
[in] | DestPath | the destination directory |
[in] | DontCopyDotDirs | flag for copying dot ('.*') directories. Default is false. |
QString OPENFLUID_API openfluid::tools::decodeXMLEntities | ( | const QString & | Str | ) |
Decodes XML entities to characters
[in] | Str | the string to decode |
bool OPENFLUID_API openfluid::tools::emptyDirectoryRecursively | ( | const std::string & | Path | ) |
Recursively removes all files and directories contained in the given directory. It deletes the directory and recreates it.
[in] | Path | the directory to empty |
QString OPENFLUID_API 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 |
bool OPENFLUID_API openfluid::tools::extractVariableNameAndType | ( | const openfluid::core::VariableName_t & | Name, |
openfluid::core::VariableName_t & | VarName, | ||
openfluid::core::Value::Type & | VarType | ||
) |
Checks and extracts variable name and type from a full variable name (with or without type).
To be valid, a variable name must only contain alphanumeric, '_', '-' or '.' characters, must begin by an alphanumeric character, and can be suffixed by a valid type into square brackets.
[in] | Name | the variable name to process |
[out] | VarName | the extracted variable name |
[out] | VarType | the extracted variable type |
std::vector<std::string> OPENFLUID_API openfluid::tools::findDirectories | ( | const std::string & | Path, |
bool | WithPath = false |
||
) |
Gets the list of directories found in the specified directory
[in] | Path | the directory to explore |
[in] | WithPath | return full path if true, directory name only otherwise |
std::vector<std::string> OPENFLUID_API openfluid::tools::findFilesByExtension | ( | const std::string & | Path, |
const std::string & | Ext, | ||
bool | WithPath = false , |
||
bool | ExtIncludeDot = false |
||
) |
Gets the list of files with specified extension contained in the specified directory
[in] | Path | 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> OPENFLUID_API openfluid::tools::findFilesBySuffixAndExtension | ( | const std::string & | Path, |
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] | Path | 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::string OPENFLUID_API 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::string OPENFLUID_API openfluid::tools::generatePseudoUniqueIdentifier | ( | const unsigned int | Length | ) |
Generates a pseudo-unique identifier using alphanumeric characters and Mersenne Twister random engine.
[in] | Length | the length of the identifier to generate |
std::string OPENFLUID_API openfluid::tools::getDurationAsPrettyString | ( | long int | MSecsDuration | ) |
returns the given duration as a pretty string representing days, hours, minutes and decimal seconds.
[in] | MSecsDuration | the duration in milliseconds |
bool OPENFLUID_API openfluid::tools::isValidAlphaNumName | ( | const std::string & | Name | ) |
Checks whether an alphanumeric name is valid or not.
To be valid, a name must only contain alphanumeric characters.
[in] | Name | the name to check |
bool OPENFLUID_API openfluid::tools::isValidAttributeName | ( | const openfluid::core::AttributeName_t & | Name | ) |
Checks whether an attribute name is valid or not.
To be valid, an attribute name must only contain alphanumeric, '_', '-' or '.' characters, and must begin by an alphanumeric character.
[in] | Name | the attribute name to check |
bool OPENFLUID_API openfluid::tools::isValidTypedVariableName | ( | const openfluid::core::VariableName_t & | Name | ) |
Checks whether a variable name (with or without type) is valid or not.
To be valid, a variable name must only contain alphanumeric, '_', '-' or '.' characters, must begin by an alphanumeric character, and can be suffixed by a valid type into square brackets.
[in] | Name | the variable name to check |
bool OPENFLUID_API openfluid::tools::isValidVariableName | ( | const openfluid::core::VariableName_t & | Name | ) |
Checks whether a variable name (without type) is valid or not.
To be valid, a variable name must only contain alphanumeric, '_', '-' or '.' characters, and must begin by an alphanumeric character.
[in] | Name | the variable name to check |
bool OPENFLUID_API openfluid::tools::isValidWareID | ( | const openfluid::ware::WareID_t & | ID | ) |
Checks whether a ware ID is valid or not.
To be valid, a ware ID must only contain alphanumeric, '_', '-', '.' characters, and must begin by an alphanumeric character.
[in] | ID | the ware ID to check |
bool OPENFLUID_API openfluid::tools::matchWithWildcard | ( | 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 |
void OPENFLUID_API openfluid::tools::microsleep | ( | const unsigned long | USec | ) |
void OPENFLUID_API openfluid::tools::millisleep | ( | const unsigned long | MSec | ) |
std::string OPENFLUID_API openfluid::tools::removeTrailingSlashes | ( | const std::string & | Str | ) |
Removes trailing slashes if any, useful for cleaning paths
[in] | Str | the string to process |
std::string OPENFLUID_API 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 OPENFLUID_API openfluid::tools::splitDuration | ( | long int | MSecsDuration, |
int & | Days, | ||
int & | Hours, | ||
int & | Minutes, | ||
int & | Seconds, | ||
int & | MSecs | ||
) |
splits the given duration in milliseconds into days, hours, minutes, seconds and milliseconds.
[in] | MSecsDuration | the duration in milliseconds |
[out] | Days | the number of days |
[out] | Hours | the number of hours |
[out] | Minutes | the number of minutes |
[out] | Seconds | the number of seconds |
[out] | MSecs | the number of milliseconds |
std::vector<std::string> OPENFLUID_API 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 |
|
inline |
QString OPENFLUID_API 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 OPENFLUID_API 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 |
|
inline |
QDateTime OPENFLUID_API openfluid::tools::toQDateTime | ( | const openfluid::core::DateTime & | DT | ) |
Transforms an OpenFLUID DateTime to a QDateTime
[in] | DT | The OpenFLUID DateTime to transform |
QStringList OPENFLUID_API openfluid::tools::toQStringList | ( | const std::vector< std::string > & | StrVect | ) |
Transforms a std::vector of std::string into a QStringList
[in] | StrVect | the std::vector of std::string to transform |
QStringList OPENFLUID_API openfluid::tools::toQStringList | ( | const std::set< std::string > & | StrSet | ) |
Transforms a std::set of std::string into a QStringList
[in] | StrSet | the std::set of std::string to transform |
QStringList OPENFLUID_API openfluid::tools::toQStringList | ( | const std::list< std::string > & | StrList | ) |
Transforms a std::list of std::string into a QStringList
[in] | StrList | the std::list of std::string to transform |
QStringList OPENFLUID_API openfluid::tools::toQStringList | ( | const std::set< int > & | IntSet | ) |
Transforms a std::set of int into a QStringList
[in] | IntSet | the std::set of int to transform |
std::list<std::string> OPENFLUID_API openfluid::tools::toStdStringList | ( | const QStringList & | StrList | ) |
Transforms a QStringList into a std::list of std::string
[in] | StrList | the QStringList to transform |
std::vector<std::string> openfluid::tools::toStdStringVector | ( | const QStringList & | StrList | ) |
Transforms a QStringList into a std::vector of std::string
[in] | StrList | the QStringList to transform |