diff --git a/README.md b/README.md index 96fc8773..49e25df3 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ int main() { * [纯序员给你介绍图化框架的简单实现——面向切面](http://www.chunel.cn/archives/cgraph-aspect-introduce) * [纯序员给你介绍图化框架的简单实现——函数注入](http://www.chunel.cn/archives/cgraph-function-introduce) * [纯序员给你介绍图化框架的简单实现——消息机制](http://www.chunel.cn/archives/cgraph-message-introduce) +* [纯序员给你介绍图化框架的简单实现——事件触发](http://www.chunel.cn/archives/cgraph-event-introduce) * [纯序员给你介绍图化框架的简单实现——线程池优化(一)](http://www.chunel.cn/archives/cgraph-threadpool-1-introduce) * [纯序员给你介绍图化框架的简单实现——线程池优化(二)](http://www.chunel.cn/archives/cgraph-threadpool-2-introduce) * [纯序员给你介绍图化框架的简单实现——线程池优化(三)](http://www.chunel.cn/archives/cgraph-threadpool-3-introduce) @@ -287,8 +288,7 @@ int main() { [2023.02.22 - v2.3.4 - Chunel] * 优化Windows系统下调度机制 -* 优化`param`机制 -* 优化`event`机制 +* 优化`param`机制和`event`机制 diff --git a/src/GraphCtrl/GraphElement/_GEngine/GStaticEngine/GStaticEngine.cpp b/src/GraphCtrl/GraphElement/_GEngine/GStaticEngine/GStaticEngine.cpp index cce4f862..578528ec 100644 --- a/src/GraphCtrl/GraphElement/_GEngine/GStaticEngine/GStaticEngine.cpp +++ b/src/GraphCtrl/GraphElement/_GEngine/GStaticEngine/GStaticEngine.cpp @@ -30,7 +30,7 @@ CStatus GStaticEngine::mark(const GSortedGElementPtrSet& elements) { * 2,当前节点依赖的节点,只有一个后继 * 3,当前节点的依赖的后继,仍是当前节点 */ - for (GElement* element : elements) { + for (GElementPtr element : elements) { if (1 == element->dependence_.size() && 1 == (*element->dependence_.begin())->run_before_.size() && (*(element->dependence_.begin()))->run_before_.find(element) != (*(element->dependence_.begin()))->run_before_.end()) { diff --git a/src/GraphCtrl/GraphParam/GParamManager.cpp b/src/GraphCtrl/GraphParam/GParamManager.cpp index c72fb228..a3e8a05f 100644 --- a/src/GraphCtrl/GraphParam/GParamManager.cpp +++ b/src/GraphCtrl/GraphParam/GParamManager.cpp @@ -65,7 +65,7 @@ CStatus GParamManager::setup() { } -CStatus GParamManager::remove(const std::string& key) { +CStatus GParamManager::removeByKey(const std::string& key) { CGRAPH_FUNCTION_BEGIN CGRAPH_LOCK_GUARD lock(this->mutex_); // 创建和销毁的时候,加锁 auto param = params_map_.find(key); diff --git a/src/GraphCtrl/GraphParam/GParamManager.h b/src/GraphCtrl/GraphParam/GParamManager.h index 6e340e12..b7f13bb7 100644 --- a/src/GraphCtrl/GraphParam/GParamManager.h +++ b/src/GraphCtrl/GraphParam/GParamManager.h @@ -47,7 +47,7 @@ class GParamManager : public GParamObject, * @param key * @return */ - CStatus remove(const std::string& key); + CStatus removeByKey(const std::string& key); /** * 获取所有的 GParam keys 信息 diff --git a/src/GraphCtrl/GraphParam/GParamManagerWrapper.h b/src/GraphCtrl/GraphParam/GParamManagerWrapper.h index eaade8c7..9ebaa3d9 100644 --- a/src/GraphCtrl/GraphParam/GParamManagerWrapper.h +++ b/src/GraphCtrl/GraphParam/GParamManagerWrapper.h @@ -72,7 +72,7 @@ CGRAPH_NAMESPACE_BEGIN */ \ CStatus removeGParam(const std::string& key) { \ CGRAPH_ASSERT_NOT_NULL(param_manager_) \ - return param_manager_->remove(key); \ + return param_manager_->removeByKey(key); \ } \ \ /**