diff --git a/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.cpp b/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.cpp index c6b815e8..aa103819 100644 --- a/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.cpp +++ b/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.cpp @@ -32,6 +32,7 @@ CStatus GMutable::addElement(GElementPtr element) { CStatus GMutable::init() { CGRAPH_FUNCTION_BEGIN + CGRAPH_ASSERT_NOT_NULL(manager_) manager_->setThreadPool(thread_pool_); status = manager_->initEngine(); CGRAPH_FUNCTION_CHECK_STATUS @@ -43,7 +44,6 @@ CStatus GMutable::init() { CStatus GMutable::run() { CGRAPH_FUNCTION_BEGIN - CGRAPH_ASSERT_NOT_NULL(manager_) /** * 1. 初始化内容 @@ -71,6 +71,12 @@ CStatus GMutable::destroy() { } +CBool GMutable::isSerializable() const { + // 情况随时可能发生变化,直接设定不可以 serialize 即可 + return false; +} + + CVoid GMutable::setup() { for (auto* element : group_elements_arr_) { element->run_before_.clear(); diff --git a/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.h b/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.h index b4b4942d..2c94fd42 100644 --- a/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.h +++ b/src/GraphCtrl/GraphElement/GGroup/GMutable/GMutable.h @@ -36,6 +36,8 @@ class GMutable : public GGroup { CStatus destroy() final; + CBool isSerializable() const override; + /** * 将数据进行恢复 * @return