Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
bigdatabase.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021-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
#include "
bigdatabase.h
"
10
11
namespace
QH
{
12
namespace
PKG
{
13
14
BigDataBase::BigDataBase
()
15
{
16
17
}
18
19
int
BigDataBase::packageId
()
const
{
20
return
_packageId;
21
}
22
23
void
BigDataBase::setPackageId
(
int
newPackageId) {
24
_packageId = newPackageId;
25
}
26
27
QDataStream &
BigDataBase::fromStream
(QDataStream &stream) {
28
29
stream >> _packageId;
30
31
return
stream;
32
}
33
34
QDataStream &
BigDataBase::toStream
(QDataStream &stream)
const
{
35
stream << _packageId;
36
37
return
stream;
38
}
39
40
bool
BigDataBase::isValid
()
const
{
41
return
AbstractData::isValid
() && _packageId >= 0;
42
43
}
44
45
QString
BigDataBase::toString
()
const
{
46
return
AbstractData::toString
() +
47
" packageId: "
+
48
QString::number(_packageId);
49
}
50
51
}
52
}
bigdatabase.h
QH::PKG::AbstractData::isValid
bool isValid() const override
isValid This method check current object to valid.
Definition
abstractdata.cpp:40
QH::PKG::AbstractData::toString
QString toString() const override
toString - Return a string implementation for this object.
Definition
abstractdata.cpp:44
QH::PKG::BigDataBase::fromStream
QDataStream & fromStream(QDataStream &stream) override
fromStream This method should be read all bytes from the stream object and full the current object.
Definition
bigdatabase.cpp:27
QH::PKG::BigDataBase::toString
QString toString() const override
Definition
bigdatabase.cpp:45
QH::PKG::BigDataBase::packageId
int packageId() const
getPackageId This method return package id that this part moving.
Definition
bigdatabase.cpp:19
QH::PKG::BigDataBase::isValid
bool isValid() const override
Definition
bigdatabase.cpp:40
QH::PKG::BigDataBase::toStream
QDataStream & toStream(QDataStream &stream) const override
fromStream This method should be write all members of the current object to the stream object.
Definition
bigdatabase.cpp:34
QH::PKG::BigDataBase::setPackageId
void setPackageId(int newPackageId)
setPackageId This method sets new id of package that this package moving
Definition
bigdatabase.cpp:23
QH::PKG::BigDataBase::BigDataBase
BigDataBase()
Definition
bigdatabase.cpp:14
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
bigdatabase.cpp
Generated by
1.18.0