11#include <QCryptographicHash>
28 return left._table == other._table && left._value == other._value;
46 return QString(
"DbAddress: table:%0, value:%1, Sha256:%2").
47 arg(_table, _value.toString(), _SHA256Hash.toHex());
55 return _value.isValid() && _table.size();
80void DbAddress::recalcHash() {
81 _SHA256Hash = QCryptographicHash::hash(
toBytes(), QCryptographicHash::Sha256);
The DbAddress class use to work with database addresses. Database Address it is structure with 2 valu...
QString toString() const
toString This method return a string implementation fo this object.
QDataStream & fromStream(QDataStream &stream)
fromStream This method should be read all bytes from the stream object and full the current object.
void setId(const QVariant &id)
setId This method set id for this address.
QByteArray SHA256Hash() const
SHA256Hash This method return address hash. This hash using into database.
QDataStream & toStream(QDataStream &stream) const
fromStream This method should be write all members of the current object to the stream object.
void setTable(const QString &table)
setTable This method set new table name of address.
bool isValid() const
isValid This method check object for valid.
const QString & table() const
table This method return table name.
const QVariant & id() const
id This method return id of object in table.
QByteArray toBytes() const
toBytes This method convert a current object to bytes array.
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
bool operator!=(const DbAddress &left, const DbAddress &other)
uint qHash(NodeCoonectionStatus status)
qHash - Simple hash function of NodeCoonectionStatus
bool operator==(const DbAddress &left, const DbAddress &other)