Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
dbaddress.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2024 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#ifndef DBADDRESS_H
9#define DBADDRESS_H
10
11#include "streambase.h"
12
13namespace QH {
14
25
26public:
27
28 DbAddress() = default;
29
35 DbAddress(const QString& table, const QVariant& id);
36
37 QDataStream &fromStream(QDataStream &stream);
38 QDataStream &toStream(QDataStream &stream) const;
39
44 QString toString() const;
45
46 friend bool operator== (const DbAddress& left, const DbAddress& other);
47 friend bool operator!= (const DbAddress& left, const DbAddress& other);
48
53 bool isValid() const;
54
59 const QString& table() const;
60
65 void setTable(const QString &table);
66
71 const QVariant &id() const;
72
77 void setId(const QVariant &id);
78
84 QByteArray SHA256Hash() const;
85
86private:
87
88 void recalcHash();
89
90 QString _table;
91 QVariant _value;
92 QByteArray _SHA256Hash;
93};
94
100qint64 qHash(const DbAddress& address);
101
102}
103
105
106#endif // DBADDRESS_H
The DbAddress class use to work with database addresses. Database Address it is structure with 2 valu...
Definition dbaddress.h:24
DbAddress()=default
The StreamBase class add support streaming data for all children classes. For correctly working all s...
Definition streambase.h:28
#define HEARTSHARED_EXPORT
Q_DECLARE_METATYPE(QH::HostAddress)
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