Move project in sub
This commit is contained in:
parent
f868166756
commit
ec1af1b8e5
43 changed files with 358 additions and 2 deletions
|
|
@ -1,37 +0,0 @@
|
|||
#include "dpoint_entity.h"
|
||||
|
||||
dpoint_entity::dpoint_entity(const QString &title) : _title(title) {
|
||||
this->_id = 0;
|
||||
auto hash = QCryptographicHash::hash(title.toLocal8Bit(), QCryptographicHash::Md5);
|
||||
for (auto bit : hash) {
|
||||
this->_id += bit;
|
||||
}
|
||||
}
|
||||
|
||||
entity_id dpoint_entity::id() {
|
||||
return this->_id;
|
||||
}
|
||||
|
||||
QString dpoint_entity::title() {
|
||||
return this->_title;
|
||||
}
|
||||
|
||||
const QVector<storage_entity> dpoint_entity::storages() {
|
||||
return this->_storages;
|
||||
}
|
||||
|
||||
void dpoint_entity::serialize(QDataStream &output) {
|
||||
output << this->_id << this->_title << this->_storages.size();
|
||||
for (auto &item : this->_storages) {
|
||||
item.serialize(output);
|
||||
}
|
||||
}
|
||||
|
||||
void dpoint_entity::deserialize(QDataStream &input) {
|
||||
int icnt;
|
||||
input >> this->_id >> this->_title >> icnt;
|
||||
this->_storages.resize(icnt);
|
||||
for (int i = 0; i < icnt; i++) {
|
||||
this->_storages[i].deserialize(input);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue