Add subsystem interactions to main framework

This commit is contained in:
Andrew nuark G 2020-12-16 00:33:38 +07:00
parent 6458ebe2a4
commit 4cef87e506
2 changed files with 20 additions and 2 deletions

View file

@ -34,6 +34,8 @@ apparatus::apparatus() {
}
apparatus::~apparatus() {
this->shutdown();
if (this->_bin_file) {
this->_bin_file->flush();
this->_bin_file->close();
@ -54,6 +56,14 @@ bool apparatus::isFirstRun() {
return QFile(apparatus::filename).exists();
}
const auth_system& apparatus::get_auth_subsystem() {
return this->_auth_system;
}
const object_system& apparatus::get_object_subsystem() {
return this->_object_system;
}
void apparatus::init() {
apparatus::_instance = new apparatus();
}
@ -81,9 +91,11 @@ void apparatus::loadGIDS() {
}
void apparatus::serialize_data() {
this->_auth_system.init(this->stream);
this->_object_system.init(this->stream);
}
void apparatus::deserialize_data() {
this->_auth_system.shutdown(this->stream);
this->_object_system.shutdown(this->stream);
}