Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::DistVersion Class Reference

The DistVersion class This is information of supported versions of the destinations api. More...

#include <distversion.h>

Inheritance diagram for QH::DistVersion:
Inheritance graph
Collaboration diagram for QH::DistVersion:
Collaboration graph

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.
 

Detailed Description

The DistVersion class This is information of supported versions of the destinations api.

Definition at line 21 of file distversion.h.

Member Function Documentation

◆ 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
streamThis 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
distVersionthis is dis version.
Returns
return maximum version. if this version is not found return "-1"

Definition at line 19 of file distversion.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMinCompatible()

int QH::DistVersion::getMinCompatible ( const DistVersion distVersion) const

getMinСompatible return maximum available on booth nodes version.

Parameters
distVersionthis is dis version.
Returns
return minimum version. if this version is not found return "-1"

Definition at line 29 of file distversion.cpp.

Here is the call graph for this function:

◆ isSupport()

bool QH::DistVersion::isSupport ( unsigned short  version) const

isSupport This method return true if the version is supported of this versions range.

Parameters
versionThis is checked version.
Returns
true if the version is supported of this versions range.

Definition at line 39 of file distversion.cpp.

◆ max()

unsigned short QH::DistVersion::max ( ) const

Definition at line 11 of file distversion.cpp.

Here is the caller graph for this function:

◆ min()

unsigned short QH::DistVersion::min ( ) const

Definition at line 64 of file distversion.cpp.

Here is the caller graph for this function:

◆ operator bool()

QH::DistVersion::operator bool ( ) const

Definition at line 60 of file distversion.cpp.

◆ setMax()

void QH::DistVersion::setMax ( unsigned short  newMax)

Definition at line 15 of file distversion.cpp.

Here is the caller graph for this function:

◆ setMin()

void QH::DistVersion::setMin ( unsigned short  newMin)

Definition at line 68 of file distversion.cpp.

Here is the caller graph for this function:

◆ 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
streamThis 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

Definition at line 43 of file distversion.cpp.


The documentation for this class was generated from the following files: