Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
universaldata.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2023-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 UNIVERSALDATA_H
9
#define UNIVERSALDATA_H
10
11
#include "
abstractdata.h
"
12
13
namespace
QH
{
14
namespace
PKG
{
15
50
class
HEARTSHARED_EXPORT
UniversalData
:
public
QH::PKG::AbstractData
51
{
52
public
:
53
UniversalData
();
54
60
void
setValue
(
int
key,
const
QVariant&
value
);
61
66
const
QVariant&
value
(
int
key,
const
QVariant& defaultVal = {})
const
;
67
73
QVariant*
ref
(
int
key);
74
75
protected
:
76
QDataStream &
fromStream
(QDataStream &stream)
override
final
;
77
QDataStream &
toStream
(QDataStream &stream)
const
override
final
;
78
79
private
:
80
QHash<int, QVariant> _data;
81
};
82
83
}
84
}
85
86
#endif
// UNIVERSALDATA_H
abstractdata.h
QH::PKG::AbstractData
The AbstractData class is provide base functions for transport data by network For create you own pac...
Definition
abstractdata.h:83
QH::PKG::UniversalData::setValue
void setValue(int key, const QVariant &value)
setValue This method sets new value for the filed. Works like a insert method of the QMap
Definition
universaldata.cpp:19
QH::PKG::UniversalData::UniversalData
UniversalData()
Definition
universaldata.cpp:14
QH::PKG::UniversalData::value
const QVariant & value(int key, const QVariant &defaultVal={}) const
value this method return value of the key.
Definition
universaldata.cpp:23
QH::PKG::UniversalData::toStream
QDataStream & toStream(QDataStream &stream) const override final
fromStream This method should be write all members of the current object to the stream object.
Definition
universaldata.cpp:52
QH::PKG::UniversalData::fromStream
QDataStream & fromStream(QDataStream &stream) override final
fromStream This method should be read all bytes from the stream object and full the current object.
Definition
universaldata.cpp:45
QH::PKG::UniversalData::ref
QVariant * ref(int key)
ref This method return pointer to the object If this object is not exists return nullptr
Definition
universaldata.cpp:36
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
universaldata.h
Generated by
1.18.0