FCT
载入中...
搜索中...
未找到
Semaphore.h
浏览该文件的文档.
1
//
2
// Created by Administrator on 2025/4/1.
3
//
4
#ifndef SEMAPHORE_H
5
#define SEMAPHORE_H
6
#include "
../MutilThreadBase/RefCount.h
"
7
namespace
FCT
8
{
9
namespace
RHI
10
{
11
class
Semaphore
:
public
FCT::RefCount
,
public
FCT::DeletableTrait
<Semaphore>
12
{
13
public
:
14
Semaphore
() :
FCT
::
RefCount
(0)
15
{
16
17
}
18
virtual
~Semaphore
() =
default
;
19
//实在需要reset可以 调用create,但是不推荐
26
virtual
void
create
() = 0;
32
virtual
void
destroy
() = 0;
33
void
deleteThis
()
override
{
34
if
(!this->
applyDeleter
(
this
)) {
35
FCT_DELETE
(
this
);
36
}
37
}
38
protected
:
39
40
};
41
}
42
}
43
44
45
#endif
//SEMAPHORE_H
FCT_DELETE
#define FCT_DELETE(args)
定义
MemoryCheak.h:164
RefCount.h
FCT::DeletableTrait
用于自定义对象销毁行为
定义
RefCount.h:50
FCT::DeletableTrait< Semaphore >::applyDeleter
bool applyDeleter(Semaphore *ptr)
定义
RefCount.h:64
FCT::RHI::Semaphore::~Semaphore
virtual ~Semaphore()=default
FCT::RHI::Semaphore::destroy
virtual void destroy()=0
销毁一个 信号量
FCT::RHI::Semaphore::create
virtual void create()=0
创建 信号量
FCT::RHI::Semaphore::Semaphore
Semaphore()
定义
Semaphore.h:14
FCT::RHI::Semaphore::deleteThis
void deleteThis() override
定义
Semaphore.h:33
FCT::RefCount
定义
RefCount.h:5
FCT::RefCount::RefCount
RefCount()
定义
RefCount.h:7
FCT::RHI
定义
CommandBufferGraph.h:14
FCT
定义
Enums.h:8
src
RHI
Semaphore.h
制作者
1.14.0