Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
apiversion.h
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2020-2025 QuasarApp.
3
//# Distributed under the GPLv3 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 APPVERSION_H
9
#define APPVERSION_H
10
11
#include "
distversion.h
"
12
#include <
abstractdata.h
>
13
14
15
namespace
QH
{
16
17
namespace
PKG
{
18
19
23
class
APIVersion
:
public
QH::PKG::AbstractData
24
{
25
26
public
:
27
APIVersion
();
28
29
static
unsigned
short
command
(){
return
PROTOCKOL_VERSION_COMMAND
;}
30
static
unsigned
short
version
(){
return
0;}
31
32
static
QString
commandText
(){
return
"PROTOCKOL_VERSION_COMMAND"
;}
33
unsigned
short
cmd
()
const override
{
return
APIVersion::command
();}
34
35
QString
cmdString
()
const override
{
return
APIVersion::commandText
();}
36
37
bool
isValid
()
const override
;
38
43
PackagesVersionData
packagesVersions
()
const
;
44
void
setPackagesVersions
(
const
PackagesVersionData
&newPackagesVersions);
45
46
VersionData
apisVersions
()
const
;
47
void
setApisVersions
(
const
VersionData
&newApisVersions);
48
49
protected
:
50
QDataStream &
fromStream
(QDataStream &stream)
override
;
51
QDataStream &
toStream
(QDataStream &stream)
const override
;
52
53
private
:
54
VersionData
_apisVersions;
55
PackagesVersionData
_packagesVersions;
56
57
};
58
59
}
60
}
61
#endif
// APPVERSION_H
abstractdata.h
PROTOCKOL_VERSION_COMMAND
#define PROTOCKOL_VERSION_COMMAND
PROTOCKOL_VERSION_COMMAND is command for exchange versions number betwin nodes.
Definition
abstractdata.h:20
QH::PKG::APIVersion::commandText
static QString commandText()
Definition
apiversion.h:32
QH::PKG::APIVersion::setPackagesVersions
void setPackagesVersions(const PackagesVersionData &newPackagesVersions)
Definition
apiversion.cpp:44
QH::PKG::APIVersion::command
static unsigned short command()
Definition
apiversion.h:29
QH::PKG::APIVersion::setApisVersions
void setApisVersions(const VersionData &newApisVersions)
Definition
apiversion.cpp:36
QH::PKG::APIVersion::APIVersion
APIVersion()
Definition
apiversion.cpp:14
QH::PKG::APIVersion::isValid
bool isValid() const override
Definition
apiversion.cpp:48
QH::PKG::APIVersion::apisVersions
VersionData apisVersions() const
Definition
apiversion.cpp:32
QH::PKG::APIVersion::fromStream
QDataStream & fromStream(QDataStream &stream) override
fromStream This method should be read all bytes from the stream object and full the current object.
Definition
apiversion.cpp:18
QH::PKG::APIVersion::cmd
unsigned short cmd() const override
cmd - This is command of this object, (for generate cmd use macross QH_PACKAGE)
Definition
apiversion.h:33
QH::PKG::APIVersion::cmdString
QString cmdString() const override
cmdString - This is command string of this object, (for generate cmd use macross QH_PACKAGE)
Definition
apiversion.h:35
QH::PKG::APIVersion::version
static unsigned short version()
Definition
apiversion.h:30
QH::PKG::APIVersion::packagesVersions
PackagesVersionData packagesVersions() const
packagesVersions This method return list of available multi-version packages on the node.
Definition
apiversion.cpp:40
QH::PKG::APIVersion::toStream
QDataStream & toStream(QDataStream &stream) const override
fromStream This method should be write all members of the current object to the stream object.
Definition
apiversion.cpp:25
QH::PKG::AbstractData
The AbstractData class is provide base functions for transport data by network For create you own pac...
Definition
abstractdata.h:83
distversion.h
QH::PKG
The PKG namesapce - this namespace contains all default packages of the Heart library....
Definition
heart.h:211
QH
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition
heart.cpp:13
QH::VersionData
QHash< QString, DistVersion > VersionData
VersionData This is array of all available apis and supported its versions.
Definition
distversion.h:78
QH::PackagesVersionData
QHash< unsigned short, DistVersion > PackagesVersionData
PackagesVersionData This is some as VersionData but for int commands.
Definition
distversion.h:83
src
private
apiversion.h
Generated by
1.18.0