11#include "humanreadableobject.h"
13#include <QSharedPointer>
15#include <crc/crchash.h>
20#define PROTOCKOL_VERSION_COMMAND 0xFFFF
25#define PROTOCKOL_VERSION_RECEIVED_COMMAND PROTOCKOL_VERSION_COMMAND - 1
34#define QH_PACKAGE(S) \
36 static unsigned short command(){\
37 QByteArray ba = QString(S).toLocal8Bit();\
38 return qa_common::hash16(ba.data(), ba.size());\
40 static QString commandText(){return S;} \
41 unsigned short cmd() const override {return command();} \
43 QString cmdString() const override {return S;} \
94 virtual unsigned short cmd()
const = 0;
112 virtual bool toPackage(
Package &package,
const DistVersion &reqVersion,
unsigned int triggerHash = 0)
const;
118 virtual bool isValid()
const;
124 QString toString()
const override;
131 template<
class C,
class... Args>
133 C*
object =
new C(std::forward<Args>(args)...);
141 void fromPakcage(
const Package& pkg);
The DistVersion class This is information of supported versions of the destinations api.
The AbstractData class is provide base functions for transport data by network For create you own pac...
C * create(Args &&... args) const
create - This is factory method for create a new object.
static unsigned int command()
command This static method that return glaball code of this object.
static QString commandText()
commandText This method return text of package command
virtual QString cmdString() const =0
cmdString - This is command string of this object, (for generate cmd use macross QH_PACKAGE)
virtual unsigned short cmd() const =0
cmd - This is command of this object, (for generate cmd use macross QH_PACKAGE)
The Package struct. This is base structure for transporting data by network between QH nodes....
The StreamBase class add support streaming data for all children classes. For correctly working all s...
#define HEARTSHARED_EXPORT
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...