aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/common/bistrhash.h21
1 files changed, 20 insertions, 1 deletions
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 <QHash>
#include <QString>
@@ -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.
@@ -123,6 +124,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.
* @param cs Case sensitivity flag.
@@ -131,6 +141,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.
*/