Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Loading...
Searching...
No Matches
dbaddresskey.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8
9#include "dbaddresskey.h"
10namespace QH {
11
15
17 DbAddress(address) {
18
19}
20
21DbAddressKey::DbAddressKey(const QString &table, const QVariant &value):
22 DbAddress(table, value) {
23
24}
25
26unsigned int DbAddressKey::hash() const {
27 return qHash(*static_cast<const DbAddress*>(this));
28}
29
30bool DbAddressKey::equal(const AbstractKey *other) const {
31 auto otherObject = dynamic_cast<const DbAddressKey*>(other);
32
33 if (!otherObject)
34 return false;
35
36 return operator==(*static_cast<const DbAddress*>(this), *otherObject);
37}
38
40 return DbAddress::isValid();
41}
42
43QString DbAddressKey::toString() const {
44 return DbAddress::toString();
45}
46}
AbstractKey()=default
QString toString() const override
toString This method should be return the string implementation of this key.
unsigned int hash() const override
hash This method must be calc hash int32 code of source object.
bool equal(const AbstractKey *other) const override
equal This method must be make compare between current object and other.
bool isValid() const override
isValid This method check this key object to valid.
QString toString() const
toString This method return a string implementation fo this object.
Definition dbaddress.cpp:45
DbAddress()=default
friend bool operator==(const DbAddress &left, const DbAddress &other)
Definition dbaddress.cpp:27
bool isValid() const
isValid This method check object for valid.
Definition dbaddress.cpp:54
const QString & table() const
table This method return table name.
Definition dbaddress.cpp:58
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13
uint qHash(NodeCoonectionStatus status)
qHash - Simple hash function of NodeCoonectionStatus