Heart 1.3.848.aa44c26
Heart is base back end library for your c++ Qt projects.
|
The DistVersion class This is information of supported versions of the destinations api. More...
#include <distversion.h>
Public Member Functions | |
operator bool () const | |
unsigned short | min () const |
void | setMin (unsigned short newMin) |
unsigned short | max () const |
void | setMax (unsigned short newMax) |
int | getMaxCompatible (const DistVersion &distVersion) const |
getMaxСompatible return maximum available on booth nodes version. | |
int | getMinCompatible (const DistVersion &distVersion) const |
getMinСompatible return maximum available on booth nodes version. | |
bool | isSupport (unsigned short version) const |
isSupport This method return true if the version is supported of this versions range. | |
QString | toString () const override |
Public Member Functions inherited from QH::StreamBase | |
StreamBase () | |
virtual | ~StreamBase () |
bool | fromBytes (const QByteArray &data) |
fromBytes This method provide initialization of object from byte array. | |
QByteArray | toBytes () const |
toBytes This method convert a current object to bytes array. | |
bool | fromBase64 (const QString &data) |
fromBase64 This method provide initialization of object from the base64 string. | |
bool | fromBase64 (const QByteArray &data) |
fromBase64 This method provide initialization of object from the base64 string. | |
QByteArray | toBase64 () const |
toBase64 This method convert a current object to the base64 string. | |
template<class T > | |
T & | copy (const StreamBase &right) |
copy This is base copy method for all StreamBase structures. Default implementation it is copy from byteArray. | |
template<class T > | |
bool | compare (const T &right) |
compare This method compare array signatures of this and right objects. | |
Protected Member Functions | |
QDataStream & | fromStream (QDataStream &stream) override |
fromStream This method should be read all bytes from the stream object and full the current object. | |
QDataStream & | toStream (QDataStream &stream) const override |
fromStream This method should be write all members of the current object to the stream object. | |
Protected Member Functions inherited from QH::StreamBase | |
virtual int | parsingVersion () const |
parsingVersion this method return parsing version of Qt. By Default is 0 (last available parsing). see https://doc.qt.io/qt-6/qdatastream.html#Version-enum | |
virtual unsigned int | typeId () const |
typeId This method return id of type. | |
The DistVersion class This is information of supported versions of the destinations api.
Definition at line 21 of file distversion.h.
|
overrideprotectedvirtual |
fromStream This method should be read all bytes from the stream object and full the current object.
stream | This is Qt stream object. |
Examle of base simple implementation:
Implements QH::StreamBase.
Definition at line 47 of file distversion.cpp.
int QH::DistVersion::getMaxCompatible | ( | const DistVersion & | distVersion | ) | const |
getMaxСompatible return maximum available on booth nodes version.
distVersion | this is dis version. |
Definition at line 19 of file distversion.cpp.
int QH::DistVersion::getMinCompatible | ( | const DistVersion & | distVersion | ) | const |
getMinСompatible return maximum available on booth nodes version.
distVersion | this is dis version. |
Definition at line 29 of file distversion.cpp.
bool QH::DistVersion::isSupport | ( | unsigned short | version | ) | const |
isSupport This method return true if the version is supported of this versions range.
version | This is checked version. |
Definition at line 39 of file distversion.cpp.
unsigned short QH::DistVersion::max | ( | ) | const |
unsigned short QH::DistVersion::min | ( | ) | const |
QH::DistVersion::operator bool | ( | ) | const |
Definition at line 60 of file distversion.cpp.
void QH::DistVersion::setMax | ( | unsigned short | newMax | ) |
void QH::DistVersion::setMin | ( | unsigned short | newMin | ) |
|
overrideprotectedvirtual |
fromStream This method should be write all members of the current object to the stream object.
stream | This is Qt stream object. |
Examle of base simple implementation:
Implements QH::StreamBase.
Definition at line 54 of file distversion.cpp.
|
override |
Definition at line 43 of file distversion.cpp.