use newly Compartor<>

This commit is contained in:
2024-12-05 13:49:44 +08:00
parent abad1784c2
commit a1d8ad52cb
11 changed files with 34 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include<hgl/graph/VK.h>
#include<hgl/graph/VKDevice.h>
@@ -60,6 +60,8 @@ class GraphModule
AnsiIDName module_name;
SortedSet<AnsiIDName> dependent_module; ///<依赖的模块
bool module_enable;
bool module_ready;
@@ -93,6 +95,13 @@ public:
virtual bool Init(){return true;} ///<初始化当前模块
int Comp(const GraphModule *gm)const
{
return(dependent_module.Contains(gm->module_name)?1:-1); //如果我依赖于他,那么我比他大
}
CompOperator(const GraphModule *,Comp)
public:
GraphModule * GetModule(const AnsiIDName &name,bool create=false){return module_manager->GetModule(name,create);} ///<获取指定名称的模块