digiKam
|
Public Types | |
enum | { Version = 1 } |
Public Member Functions | |
DatabaseBlob ()=default | |
void | read (const QByteArray &array, Haar::SignatureData &data) |
QByteArray | write (Haar::SignatureData &data) |
This class encapsulates the Haar signature in a QByteArray that can be stored as a BLOB in the database.
Reading and writing is done in a platform-independent manner, which induces a certain overhead, but which is necessary IMO.
|
default |
void Digikam::DatabaseBlob::read | ( | const QByteArray & | array, |
Haar::SignatureData & | data | ||
) |
Read the QByteArray into the Haar::SignatureData.
References Digikam::Haar::SignatureData::avg, Digikam::Haar::NumberOfCoefficients, Digikam::Haar::SignatureData::sig, and Version.
Referenced by Digikam::HaarIface::bestMatchesForSignature(), Digikam::HaarIface::Private::rebuildSignatureCache(), and Digikam::HaarIface::retrieveSignatureFromDB().
QByteArray Digikam::DatabaseBlob::write | ( | Haar::SignatureData & | data | ) |
References Digikam::Haar::SignatureData::avg, Digikam::Haar::NumberOfCoefficients, Digikam::Haar::SignatureData::sig, and Version.
Referenced by Digikam::HaarIface::signatureAsText().