提交 3e47b26d 编写于 作者: S starlord

MS-343 implement ResourceMgr


Former-commit-id: f0f04297bb219cfa20e4eba609ff390f84e3a4a3
上级 549b18f8
......@@ -63,15 +63,19 @@ ResourceMgr::EventProcess() {
ResourceWPtr res(resources_[i]);
if (start_up_event_[i]) {
on_start_up_(res);
start_up_event_[i] = false;
}
if (finish_task_event_[i]) {
on_finish_task_(res);
finish_task_event_[i] = false;
}
if (copy_completed_event_[i]) {
on_copy_completed_(res);
copy_completed_event_[i] = false;
}
if (task_table_updated_event_[i]) {
on_task_table_updated_(res);
task_table_updated_event_[i] = false;
}
}
}
......@@ -100,6 +104,18 @@ ResourceMgr::Stop() {
}
}
std::string
ResourceMgr::Dump() {
std::string str = "ResourceMgr contains " + std::to_string(resources_.size()) + " resources.\n";
for (uint64_t i = 0; i < resources_.size(); ++i) {
str += "Resource No." + std::to_string(i) + ":\n";
str += resources_[i]->Dump();
}
return str;
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册