Abstraction and serialization for entities
This commit is contained in:
parent
5cb96fb793
commit
48ad2f1817
13 changed files with 106 additions and 12 deletions
|
|
@ -19,3 +19,11 @@ QString cargo_entity::title() {
|
|||
unsigned int cargo_entity::volume() {
|
||||
return this->_volume;
|
||||
}
|
||||
|
||||
void cargo_entity::serialize(QDataStream &output) {
|
||||
output << this->_id << this->_title << this->_volume;
|
||||
}
|
||||
|
||||
void cargo_entity::deserialize(QDataStream &input) {
|
||||
input >> this->_id >> this->_title >> this->_volume;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue