The DistVersion class This is information of supported versions of the destinations api.
More...
#include <distversion.h>
|
| | 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 |
| bool | isValid () const override |
| | StreamBase () |
| virtual | ~StreamBase () |
| bool | fromBytes (const QByteArray &dataz) |
| | 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.
|
|
| 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.
|
| 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.
◆ fromStream()
| QDataStream & QH::DistVersion::fromStream |
( |
QDataStream & | stream | ) |
|
|
overrideprotectedvirtual |
fromStream This method should be read all bytes from the stream object and full the current object.
- Note
- The implementation of this method should be invoke a method of base class.
- Parameters
-
| stream | This is Qt stream object. |
- Returns
- Qt stream object.
Examle of base simple implementation:
QDataStream &ExampleClass::fromStream(QDataStream &stream) const {
stream >> exampleMember;
return stream;
}
virtual QDataStream & toStream(QDataStream &stream) const =0
fromStream This method should be write all members of the current object to the stream object.
Implements QH::StreamBase.
Definition at line 47 of file distversion.cpp.
◆ getMaxCompatible()
| int QH::DistVersion::getMaxCompatible |
( |
const DistVersion & | distVersion | ) |
const |
getMaxСompatible return maximum available on booth nodes version.
- Parameters
-
| distVersion | this is dis version. |
- Returns
- return maximum version. if this version is not found return "-1"
Definition at line 19 of file distversion.cpp.
◆ getMinCompatible()
| int QH::DistVersion::getMinCompatible |
( |
const DistVersion & | distVersion | ) |
const |
getMinСompatible return maximum available on booth nodes version.
- Parameters
-
| distVersion | this is dis version. |
- Returns
- return minimum version. if this version is not found return "-1"
Definition at line 29 of file distversion.cpp.
◆ isSupport()
| bool QH::DistVersion::isSupport |
( |
unsigned short | version | ) |
const |
isSupport This method return true if the version is supported of this versions range.
- Parameters
-
| version | This is checked version. |
- Returns
- true if the version is supported of this versions range.
Definition at line 39 of file distversion.cpp.
◆ isValid()
| bool QH::DistVersion::isValid |
( |
| ) |
const |
|
override |
◆ max()
| unsigned short QH::DistVersion::max |
( |
| ) |
const |
◆ min()
| unsigned short QH::DistVersion::min |
( |
| ) |
const |
◆ operator bool()
| QH::DistVersion::operator bool |
( |
| ) |
const |
◆ setMax()
| void QH::DistVersion::setMax |
( |
unsigned short | newMax | ) |
|
◆ setMin()
| void QH::DistVersion::setMin |
( |
unsigned short | newMin | ) |
|
◆ toStream()
| QDataStream & QH::DistVersion::toStream |
( |
QDataStream & | stream | ) |
const |
|
overrideprotectedvirtual |
fromStream This method should be write all members of the current object to the stream object.
- Note
- The implementation of this method should be invoke a method of base class.
- Parameters
-
| stream | This is Qt stream object. |
- Returns
- Qt stream object.
Examle of base simple implementation:
QDataStream &ExampleClass::toStream(QDataStream &stream) const {
stream << exampleMember;
return stream;
}
Implements QH::StreamBase.
Definition at line 54 of file distversion.cpp.
◆ toString()
| QString QH::DistVersion::toString |
( |
| ) |
const |
|
override |
The documentation for this class was generated from the following files: