QtCraft API C++ classes QML types Handbook

QcHangingCodec Namespace

The item frames and paintings of one chunk in its entity blob (decision E-793): after the flag whether the chunk was populated, so blobs written before them read unchanged. More...

Header: #include <server/storage/QcHangingCodec.h>

Functions

std::optional<QList<QcEntityRecord::Ordered<QcHangingEntity>>> read(QDataStream &stream, QcChunkPos chunk, const QcContentRegistry &content, QcLoadWarnings &warnings)
void write(QDataStream &stream, const QList<QcEntityRecord::Ordered<QcHangingEntity>> &hangings, const QcContentRegistry &content)

Detailed Description

Per entry the name of its item, its place in the table (QcEntityRecord::Ordered) and its components (QcComponentFrames, QcEntityCodec::Component::Hanging).

Function Documentation

std::optional<QList<QcEntityRecord::Ordered<QcHangingEntity>>> QcHangingCodec::read(QDataStream &stream, QcChunkPos chunk, const QcContentRegistry &content, QcLoadWarnings &warnings)

Returns the entries of the record of chunk that follow in stream, none at its end (every entry hangs in chunk). An unknown item or motif, or a painting whose motif grew out of the chunk, drops its entry with a warning in warnings (names looked up in content); nothing for damaged data (values that cannot be).

void QcHangingCodec::write(QDataStream &stream, const QList<QcEntityRecord::Ordered<QcHangingEntity>> &hangings, const QcContentRegistry &content)

Writes hangings to stream, motifs by their name in content.