Enzo
Loading...
Searching...
No Matches
UpdateLock.h
1#pragma once
2
3namespace enzo::nt
4{
5
6// forward declaration
7class NetworkManager;
8
16{
17public:
19
24 static unsigned int getNumLocks();
25
29 static bool isLocked();
30
34 static bool isUnlocked();
35
36
37private:
38 UpdateLock();
39
40 static unsigned int lockCounter;
41
42 friend nt::NetworkManager;
43};
44}
The central coordinator of the engine's node system.
Definition NetworkManager.h:27
Prevents updates on the network manager while in scope.
Definition UpdateLock.h:16
static bool isUnlocked()
Returns whether the lock is active or not. The lock is active as long as getNumLocks > 0.
Definition UpdateLock.cpp:33
static unsigned int getNumLocks()
Returns the number of locks across all UpdateLock objects.
Definition UpdateLock.cpp:23
static bool isLocked()
Returns whether the lock is active or not. The lock is active as long as getNumLocks > 0.
Definition UpdateLock.cpp:28