Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
ping.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018-2025 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
9
#ifndef PING_H
10
#define PING_H
11
12
#include "
abstractdata.h
"
13
14
15
namespace
QH
{
16
namespace
PKG
{
17
21
class
HEARTSHARED_EXPORT
Ping
:
public
AbstractData
22
{
23
QH_PACKAGE
(
"Ping"
)
24
25
public
:
26
Ping
();
27
Ping
(
const
Package
& from);
28
29
// AbstractData interface
34
bool
isValid
()
const override
;
35
41
bool
ansver
()
const
;
42
43
/* I thing you need to correct the name of this method. From "setAnsver" to "setAnswer" */
44
49
void
setAnsver
(
bool
ansver
);
50
51
protected
:
52
// StreamBase interface
53
QDataStream &
fromStream
(QDataStream &stream)
override
;
54
QDataStream &
toStream
(QDataStream &stream)
const override
;
55
56
private
:
57
bool
_ansver =
false
;
58
};
59
}
60
}
61
#endif
// PING_H
62
63
64
abstractdata.h
QH_PACKAGE
#define QH_PACKAGE(S)
QH_PACKAGE This macross prepare data to send and create a global id for package. For get global id us...
Definition
abstractdata.h:34
QH::PKG::AbstractData::AbstractData
AbstractData()
AbstractData - Base constructor of this object.
Definition
abstractdata.cpp:18
QH::PKG::Ping::fromStream
QDataStream & fromStream(QDataStream &stream) override
fromStream This method should be read all bytes from the stream object and full the current object.
Definition
ping.cpp:35
QH::PKG::Ping::toStream
QDataStream & toStream(QDataStream &stream) const override
fromStream This method should be write all members of the current object to the stream object.
Definition
ping.cpp:42
QH::PKG::Ping::setAnsver
void setAnsver(bool ansver)
setAnsver - Set the answer option.
Definition
ping.cpp:31
QH::PKG::Ping::isValid
bool isValid() const override
isValid - Check this package if valid.
Definition
ping.cpp:23
QH::PKG::Ping::Ping
Ping()
Definition
ping.cpp:15
QH::PKG::Ping::ansver
bool ansver() const
answer This is bool value for check this object that it is answer or request. Using on tests.
Definition
ping.cpp:27
QH::Package
The Package struct. This is base structure for transporting data by network between QH nodes....
Definition
package.h:23
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
src
public
packages
ping.h
Generated by
1.18.0