Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::PKG::BigDataPart Class Reference

The BigDataPart class This data class used for transporting big data files greater than 64kb. More...

#include <bigdatapart.h>

Inheritance diagram for QH::PKG::BigDataPart:
Inheritance graph
Collaboration diagram for QH::PKG::BigDataPart:
Collaboration graph

Public Member Functions

 BigDataPart ()
 
int getPakckageNumber () const
 getPakckageNumber This method return current package number
 
void setPakckageNumber (int newPakckageNumber)
 setPakckageNumber This method sets new number of packagePart.
 
bool isValid () const override
 isValid This method check current object to valid.
 
QString toString () const override
 
const QByteArray & data () const
 data This method return raw data of this package part.
 
void setData (const QByteArray &newData)
 setData this method sets new value raw data for pacakge part.
 
- Public Member Functions inherited from QH::PKG::BigDataBase
 BigDataBase ()
 
int packageId () const
 getPackageId This method return package id that this part moving.
 
void setPackageId (int newPackageId)
 setPackageId This method sets new id of package that this package moving
 
QString toString () const override
 
- Public Member Functions inherited from QH::PKG::AbstractData
 ~AbstractData () override
 
virtual unsigned short cmd () const =0
 cmd - This is command of this object, (for generate cmd use macross QH_PACKAGE)
 
virtual QString cmdString () const =0
 cmdString - This is command string of this object, (for generate cmd use macross QH_PACKAGE)
 
virtual bool toPackage (Package &package, const DistVersion &reqVersion, unsigned int triggerHash=0) const
 toPackage This method convert this class object to the package. For more info see Package class.
 
QString toString () const override
 toString - Return a string implementation for this object.
 
template<class C , class... Args>
C * create (Args &&... args) const
 create - This is factory method for create a new object.
 
void fromPakcage (const Package &pkg)
 fromPakcage - This method initialize the current object from a package class object.
 
- Public Member Functions inherited from QH::StreamBase
 StreamBase ()
 
virtual ~StreamBase ()
 
bool fromBytes (const QByteArray &data)
 fromBytes This method provide initialization of object from byte array.
 
QByteArray toBytes () const
 toBytes This method convert a current object to bytes array.
 
bool fromBase64 (const QString &data)
 fromBase64 This method provide initialization of object from the base64 string.
 
bool fromBase64 (const QByteArray &data)
 fromBase64 This method provide initialization of object from the base64 string.
 
QByteArray toBase64 () const
 toBase64 This method convert a current object to the base64 string.
 
template<class T >
T & copy (const StreamBase &right)
 copy This is base copy method for all StreamBase structures. Default implementation it is copy from byteArray.
 
template<class T >
bool compare (const T &right)
 compare This method compare array signatures of this and right objects.
 

Protected Member Functions

QDataStream & fromStream (QDataStream &stream) override
 fromStream This method should be read all bytes from the stream object and full the current object.
 
QDataStream & toStream (QDataStream &stream) const override
 fromStream This method should be write all members of the current object to the stream object.
 
- Protected Member Functions inherited from QH::PKG::AbstractData
 AbstractData ()
 AbstractData - Base constructor of this object.
 
- Protected Member Functions inherited from QH::StreamBase
virtual int parsingVersion () const
 parsingVersion this method return parsing version of Qt. By Default is 0 (last available parsing). see https://doc.qt.io/qt-6/qdatastream.html#Version-enum
 
virtual unsigned int typeId () const
 typeId This method return id of type.
 

Additional Inherited Members

- Static Public Member Functions inherited from QH::PKG::AbstractData
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
 

Detailed Description

The BigDataPart class This data class used for transporting big data files greater than 64kb.

Definition at line 21 of file bigdatapart.h.

Constructor & Destructor Documentation

◆ BigDataPart()

QH::PKG::BigDataPart::BigDataPart ( )

Definition at line 11 of file bigdatapart.cpp.

Member Function Documentation

◆ data()

const QByteArray & QH::PKG::BigDataPart::data ( ) const

data This method return raw data of this package part.

Returns
raw data of this package part.

Definition at line 52 of file bigdatapart.cpp.

◆ fromStream()

QDataStream & QH::PKG::BigDataPart::fromStream ( QDataStream &  stream)
overrideprotectedvirtual

fromStream This method should be read all bytes from the stream object and full the current object.

Note
The implementation of this method should be invoke a method of base class.
Parameters
streamThis is Qt stream object.
Returns
Qt stream object.

Examle of base simple implementation:

QDataStream &ExampleClass::fromStream(QDataStream &stream) const {
stream >> exampleMember;
return stream;
}
virtual QDataStream & toStream(QDataStream &stream) const =0
fromStream This method should be write all members of the current object to the stream object.

Reimplemented from QH::PKG::BigDataBase.

Definition at line 34 of file bigdatapart.cpp.

Here is the call graph for this function:

◆ getPakckageNumber()

int QH::PKG::BigDataPart::getPakckageNumber ( ) const

getPakckageNumber This method return current package number

Returns
current pacakge number

Definition at line 15 of file bigdatapart.cpp.

◆ isValid()

bool QH::PKG::BigDataPart::isValid ( ) const
overridevirtual

isValid This method check current object to valid.

Returns
True if class isValid.

Reimplemented from QH::PKG::BigDataBase.

Definition at line 23 of file bigdatapart.cpp.

Here is the call graph for this function:

◆ setData()

void QH::PKG::BigDataPart::setData ( const QByteArray &  newData)

setData this method sets new value raw data for pacakge part.

Parameters
newDatathis is a new value raw data for pacakge part.

Definition at line 56 of file bigdatapart.cpp.

◆ setPakckageNumber()

void QH::PKG::BigDataPart::setPakckageNumber ( int  newPakckageNumber)

setPakckageNumber This method sets new number of packagePart.

Parameters
newPakckageNumberThis is part package number.

Definition at line 19 of file bigdatapart.cpp.

◆ toStream()

QDataStream & QH::PKG::BigDataPart::toStream ( QDataStream &  stream) const
overrideprotectedvirtual

fromStream This method should be write all members of the current object to the stream object.

Note
The implementation of this method should be invoke a method of base class.
Parameters
streamThis is Qt stream object.
Returns
Qt stream object.

Examle of base simple implementation:

QDataStream &ExampleClass::toStream(QDataStream &stream) const {
stream << exampleMember;
return stream;
}

Reimplemented from QH::PKG::BigDataBase.

Definition at line 43 of file bigdatapart.cpp.

Here is the call graph for this function:

◆ toString()

QString QH::PKG::BigDataPart::toString ( ) const
override

Definition at line 27 of file bigdatapart.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: