|
| DataPack (const QList< QSharedPointer< Package > > &newPackData={}) |
|
unsigned int | size () const |
| size This method return of the items count of this pack.
|
|
const QList< QSharedPointer< Package > > & | packData () const |
| packData This method return source list of the elements.
|
|
void | setPackData (const QList< QSharedPointer< Package > > &newPackData) |
| setPackData This method sets new lsit of pacakges.
|
|
void | push (const QSharedPointer< Package > &data) |
| push This method append data to end of list.
|
|
void | push (const Package &data) |
| push This method append data to end of list.
|
|
bool | isValid () const override |
| isValid This implementation check all items of the pack to valid and packa size. The pack size should be more then 0.
|
|
const QByteArray & | customData () const |
| token is custom data block.
|
|
void | setCustomData (const QByteArray &newToken) |
| setCustomData This method sets custom data block
|
|
| ~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.
|
|
| 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.
|
|
template<class
Package>
class QH::PKG::DataPack< Package >
DataPack this is conteiner is wraqper of the QList for transport arrays to another node.
- Template Parameters
-
Package | This is type of trasported pacakges item. |
- Note
- All packs data objects should be inherited of the UniversalData class. This is due to classes base on abstract data may broken transporting data between nodes if you change toStream and fromStream methods. To fix this issue, we use QVariantMap container for parsing data.
- See also
- UniversalData
Definition at line 25 of file datapack.h.