From c7c4a09afa1d5f1e8ba3c3619b979453c6b05221 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 3 Jul 2025 10:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E6=96=87=E8=AF=AD=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9Registry->Register?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMAssetsManage | 2 +- CMCore | 2 +- CMPlatform | 2 +- CMUtil | 2 +- example/common/VulkanAppFramework.h | 8 ++++---- inc/hgl/WorkManager.h | 4 ++-- inc/hgl/component/Component.h | 4 ++-- inc/hgl/graph/Scene.h | 10 +++++----- inc/hgl/graph/module/GraphModuleManager.h | 6 +++--- inc/hgl/graph/mtl/MaterialLibrary.h | 14 +++++++------- res | 2 +- src/SceneGraph/RenderFramework.cpp | 10 +++++----- src/SceneGraph/component/ComponentManager.cpp | 4 ++-- src/SceneGraph/module/GraphModuleManager.cpp | 6 +++--- src/SceneGraph/scene/Scene.cpp | 6 +++--- src/ShaderGen/MaterialLibrary.cpp | 4 ++-- 16 files changed, 43 insertions(+), 43 deletions(-) diff --git a/CMAssetsManage b/CMAssetsManage index 0244bff1..60f448a8 160000 --- a/CMAssetsManage +++ b/CMAssetsManage @@ -1 +1 @@ -Subproject commit 0244bff1b60119806f683b54a137cda2cacc17ac +Subproject commit 60f448a850ae34c39202645c73ad9ed0c9e8680a diff --git a/CMCore b/CMCore index f6c50e29..25060b07 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit f6c50e29d98c722789d53455e1af4b891a01d43f +Subproject commit 25060b07d03d088b940f78ac1223f4888377f608 diff --git a/CMPlatform b/CMPlatform index fd0929d8..b6cf73de 160000 --- a/CMPlatform +++ b/CMPlatform @@ -1 +1 @@ -Subproject commit fd0929d89c3cd0c8b9818d9f583000adf0b39711 +Subproject commit b6cf73deca94d4de37567f8b5d1d1c2e78eb330e diff --git a/CMUtil b/CMUtil index 48383e5f..d67a309f 160000 --- a/CMUtil +++ b/CMUtil @@ -1 +1 @@ -Subproject commit 48383e5f63928bab43320c406219365850507246 +Subproject commit d67a309f9409364bfc543d7441d4432081e758d7 diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index d5df2a49..d3d3b4d8 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -88,7 +88,7 @@ public: { CloseShaderCompiler(); - win->UnregistryEventDispatch(this); + win->UnregisterEventDispatch(this); SAFE_CLEAR(db); SAFE_CLEAR_OBJECT_ARRAY_OBJECT(cmd_buf,swap_chain_count); @@ -154,7 +154,7 @@ public: InitCommandBuffer(); - win->RegistryEventDispatch(this); + win->RegisterEventDispatch(this); { vp_info.Set(w,h); @@ -403,8 +403,8 @@ public: ckc=new CameraKeyboardControl(camera_control); cmc=new CameraMouseControl(camera_control); - win->RegistryEventDispatch(ckc); - win->RegistryEventDispatch(cmc); + win->RegisterEventDispatch(ckc); + win->RegisterEventDispatch(cmc); RefreshCameraInfo(camera_control->GetCameraInfo(),&vp_info,camera); diff --git a/inc/hgl/WorkManager.h b/inc/hgl/WorkManager.h index eb6d1f7e..b4dc7912 100644 --- a/inc/hgl/WorkManager.h +++ b/inc/hgl/WorkManager.h @@ -29,12 +29,12 @@ namespace hgl { render_framework=rf; - rf->RegistryEventDispatch(this); + rf->RegisterEventDispatch(this); } virtual ~WorkManager() { - render_framework->UnregistryEventDispatch(this); + render_framework->UnregisterEventDispatch(this); SAFE_CLEAR(cur_work_object); } diff --git a/inc/hgl/component/Component.h b/inc/hgl/component/Component.h index f8884a6f..f509f547 100644 --- a/inc/hgl/component/Component.h +++ b/inc/hgl/component/Component.h @@ -190,7 +190,7 @@ public: //事件 const size_t GetDataTypeHash ()const override{return StaticDataTypeHash();} \ const size_t GetTypeHash ()const override{return StaticTypeHash();} -bool RegistryComponentManager(ComponentManager *); +bool RegisterComponentManager(ComponentManager *); ComponentManager *GetComponentManager(const size_t hash_code); template inline T *GetComponentManager(bool create_default=true) @@ -201,7 +201,7 @@ template inline T *GetComponentManager(bool create_default=true) { cm=new T; - RegistryComponentManager(cm); + RegisterComponentManager(cm); } return cm; diff --git a/inc/hgl/graph/Scene.h b/inc/hgl/graph/Scene.h index 163abf69..56f6d631 100644 --- a/inc/hgl/graph/Scene.h +++ b/inc/hgl/graph/Scene.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include @@ -36,14 +36,14 @@ namespace hgl::graph } };//class Scene - bool RegistryScene(Scene *sw); ///<注册场景 - bool UnregistryScene(const U8String &scene_name); ///<注销场景 + bool RegisterScene(Scene *sw); ///<注册场景 + bool UnregisterScene(const U8String &scene_name); ///<注销场景 - inline bool UnregistryScene(Scene *sw) ///<注销场景 + inline bool UnregisterScene(Scene *sw) ///<注销场景 { if(!sw)return(false); - return UnregistryScene(sw->GetSceneName()); + return UnregisterScene(sw->GetSceneName()); } Scene *GetScene(const U8String &scene_name); ///<获取指定名称的场景 diff --git a/inc/hgl/graph/module/GraphModuleManager.h b/inc/hgl/graph/module/GraphModuleManager.h index 47fec703..9c923e01 100644 --- a/inc/hgl/graph/module/GraphModuleManager.h +++ b/inc/hgl/graph/module/GraphModuleManager.h @@ -36,8 +36,8 @@ public: template bool Contains()const{return Contains(typeid(T).hash_code());} ///<确认是否包含指定类型的模块 - bool Registry(GraphModule *); ///<注册一个模块 - bool Unregistry(GraphModule *); ///<注销一个模块 + bool Register(GraphModule *); ///<注册一个模块 + bool Unregister(GraphModule *); ///<注销一个模块 template T *GetOrCreate() ///<注册一个模块 @@ -47,7 +47,7 @@ public: T *result=new T(render_framework); - Registry(result); + Register(result); return result; } diff --git a/inc/hgl/graph/mtl/MaterialLibrary.h b/inc/hgl/graph/mtl/MaterialLibrary.h index 68ed62ea..92d811fb 100644 --- a/inc/hgl/graph/mtl/MaterialLibrary.h +++ b/inc/hgl/graph/mtl/MaterialLibrary.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include #include @@ -31,18 +31,18 @@ public: };//class MaterialFactory -bool RegistryMaterialFactory(MaterialFactory *); +bool RegisterMaterialFactory(MaterialFactory *); MaterialFactory * GetMaterialFactory(const MaterialName &); -template class RegistryMaterialFactoryClass +template class RegisterMaterialFactoryClass { public: - RegistryMaterialFactoryClass() + RegisterMaterialFactoryClass() { - STD_MTL_NAMESPACE::RegistryMaterialFactory(new T); + STD_MTL_NAMESPACE::RegisterMaterialFactory(new T); } -};//class RegistryMaterialFactoryClass +};//class RegisterMaterialFactoryClass #define DEFINE_MATERIAL_FACTORY_CLASS(name,cfg_type) \ namespace inline_material \ @@ -70,7 +70,7 @@ namespace \ } \ }; \ \ - static RegistryMaterialFactoryClass MaterialFactoryInstance_##name; \ + static RegisterMaterialFactoryClass MaterialFactoryInstance_##name; \ } MaterialCreateInfo *CreateMaterialCreateInfo(const VulkanDevAttr *dev_attr,const MaterialName &,MaterialCreateConfig *cfg); diff --git a/res b/res index e1a36d78..fe8fcabe 160000 --- a/res +++ b/res @@ -1 +1 @@ -Subproject commit e1a36d78f0eead5f6bb65493432c4690637b991d +Subproject commit fe8fcabeb54f7a5b23f38260e6e09bbdcf015b7f diff --git a/src/SceneGraph/RenderFramework.cpp b/src/SceneGraph/RenderFramework.cpp index 09adac45..d4992024 100644 --- a/src/SceneGraph/RenderFramework.cpp +++ b/src/SceneGraph/RenderFramework.cpp @@ -111,7 +111,7 @@ bool RenderFramework::Init(uint w,uint h) if(!device) return(false); - win->RegistryEventDispatch(this); + win->RegisterEventDispatch(this); module_manager=new GraphModuleManager(this); @@ -126,10 +126,10 @@ bool RenderFramework::Init(uint w,uint h) return(false); rt_manager=new RenderTargetManager(this,tex_manager,rp_manager); - module_manager->Registry(rt_manager); + module_manager->Register(rt_manager); sc_module=new SwapchainModule(this,tex_manager,rt_manager,rp_manager); - module_manager->Registry(sc_module); + module_manager->Register(sc_module); render_resource=new RenderResource(device); @@ -160,8 +160,8 @@ void RenderFramework::CreateDefaultRenderer() auto ckc=new CameraKeyboardControl(fpcc); auto cmc=new CameraMouseControl(fpcc); - this->RegistryEventDispatch(ckc); - this->RegistryEventDispatch(cmc); + this->RegisterEventDispatch(ckc); + this->RegisterEventDispatch(cmc); default_camera_control=fpcc; diff --git a/src/SceneGraph/component/ComponentManager.cpp b/src/SceneGraph/component/ComponentManager.cpp index b5b60ce0..f3476c4e 100644 --- a/src/SceneGraph/component/ComponentManager.cpp +++ b/src/SceneGraph/component/ComponentManager.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -32,7 +32,7 @@ namespace hgl::graph component_manager_map=nullptr; } - bool RegistryComponentManager(ComponentManager *cm) + bool RegisterComponentManager(ComponentManager *cm) { if(!cm)return(false); diff --git a/src/SceneGraph/module/GraphModuleManager.cpp b/src/SceneGraph/module/GraphModuleManager.cpp index a35cdb72..0b09fc05 100644 --- a/src/SceneGraph/module/GraphModuleManager.cpp +++ b/src/SceneGraph/module/GraphModuleManager.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -9,7 +9,7 @@ VulkanDevice *GraphModuleManager::GetDevice()const return render_framework->GetDevice(); } -bool GraphModuleManager::Registry(GraphModule *gm) +bool GraphModuleManager::Register(GraphModule *gm) { if(!gm) return(false); @@ -25,7 +25,7 @@ bool GraphModuleManager::Registry(GraphModule *gm) return(true); } -bool GraphModuleManager::Unregistry(GraphModule *gm) +bool GraphModuleManager::Unregister(GraphModule *gm) { if(!gm) return(false); diff --git a/src/SceneGraph/scene/Scene.cpp b/src/SceneGraph/scene/Scene.cpp index dfe52f73..43fb6b2a 100644 --- a/src/SceneGraph/scene/Scene.cpp +++ b/src/SceneGraph/scene/Scene.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace hgl::graph @@ -8,7 +8,7 @@ namespace hgl::graph Map scene_world_map;///<场景列表 }//namespace - bool RegistryScene(Scene *sw) + bool RegisterScene(Scene *sw) { if(!sw)return(false); @@ -29,7 +29,7 @@ namespace hgl::graph return GetObjectFromMap(scene_world_map,scene_name); } - bool UnregistryScene(const U8String &scene_name) + bool UnregisterScene(const U8String &scene_name) { if(scene_name.IsEmpty()) return(false); diff --git a/src/ShaderGen/MaterialLibrary.cpp b/src/ShaderGen/MaterialLibrary.cpp index bfd022d9..b2ddbfcd 100644 --- a/src/ShaderGen/MaterialLibrary.cpp +++ b/src/ShaderGen/MaterialLibrary.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -12,7 +12,7 @@ namespace MaterialFactoryMapPtr material_factory_map=nullptr; }//namespace -bool RegistryMaterialFactory(MaterialFactory *mf) +bool RegisterMaterialFactory(MaterialFactory *mf) { if(!mf) return(false);