EHS
Loading...
Searching...
No Matches
BaseSemaphore.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Str.h"
5
6namespace ehs
7{
8 class EHS_LIB_IO BaseSemaphore
9 {
10 private:
11 Str_8 name;
12 UInt_32 initial;
13
14 public:
16
17 BaseSemaphore(Str_8 name, const UInt_32 initial);
18
19 BaseSemaphore(const UInt_32 initial);
20
21 BaseSemaphore(BaseSemaphore&& sem) noexcept;
22
23 BaseSemaphore(const BaseSemaphore& sem);
24
25 BaseSemaphore& operator=(BaseSemaphore&& sem) noexcept;
26
28
29 virtual void Initialize() = 0;
30
31 virtual void Release() = 0;
32
33 virtual void Signal(const UInt_32 inc) = 0;
34
35 virtual bool Wait(const UInt_32 timeout) = 0;
36
37 Str_8 GetName() const;
38
39 UInt_32 GetInitial() const;
40
41 virtual bool IsValid() const = 0;
42 };
43}
Str_8 GetName() const
Definition BaseSemaphore.cpp:52
virtual bool IsValid() const =0
BaseSemaphore()
Definition BaseSemaphore.cpp:5
virtual void Initialize()=0
BaseSemaphore & operator=(BaseSemaphore &&sem) noexcept
Definition BaseSemaphore.cpp:41
virtual bool Wait(const UInt_32 timeout)=0
virtual void Signal(const UInt_32 inc)=0
UInt_32 GetInitial() const
Definition BaseSemaphore.cpp:57
virtual void Release()=0
Definition Anchor.h:6
unsigned int UInt_32
Definition Types.h:49
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1953