From 3565aad630864ecdbe53fdaa501ea708555b3c7c Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sun, 30 Apr 2023 18:30:36 -0400 Subject: New upstream version 3.4.4+dfsg. --- SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h') diff --git a/SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h b/SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h index cec9b8a..0ad80ea 100644 --- a/SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h +++ b/SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h @@ -1,7 +1,6 @@ #ifndef BISTRHASH_H #define BISTRHASH_H -#include "bihash.h" #include "coreSQLiteStudio_global.h" #include #include @@ -44,6 +43,8 @@ class API_EXPORT BiStrHash */ BiStrHash(const BiStrHash& other); + BiStrHash& operator=(const BiStrHash& other); + /** * @brief Inserts entry into the hash. * @param left Left-side value to insert. @@ -122,6 +123,15 @@ class API_EXPORT BiStrHash */ QString valueByLeft(const QString& left, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + /** + * @brief Finds right-side value by matching the left-side value or returns defaultValue if not matched. + * @param left Left-side value to match. + * @param defaultValue Value to be returned if requested left key cannot be found. + * @param cs Case sensitivity flag. + * @return Right-side value, or provided default value if left-side value was not matched. + */ + QString valueByLeft(const QString& left, const QString& defaultValue, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + /** * @brief Finds left-side value by matching the right-side value. * @param right Right-side value to match. @@ -130,6 +140,15 @@ class API_EXPORT BiStrHash */ QString valueByRight(const QString& right, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + /** + * @brief Finds left-side value by matching the right-side value or returns defaultValue if not matched. + * @param right Right-side value to match. + * @param defaultValue Value to be returned if requested right key cannot be found. + * @param cs Case sensitivity flag. + * @return Left-side value, or provided default value if right-side value was not matched. + */ + QString valueByRight(const QString& right, const QString& defaultValue, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + /** * @brief Gives all left-side values. * @return List of values. -- cgit v1.2.3