mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-07 05:57:47 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "rbx/atomic.h"
|
||||
#include "rbx/Declarations.h"
|
||||
|
||||
namespace RBX
|
||||
{
|
||||
|
||||
namespace Diagnostics
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class RBXBaseClass Countable
|
||||
{
|
||||
static rbx::atomic<int> count;
|
||||
public:
|
||||
static long getCount() { return count; }
|
||||
~Countable()
|
||||
{
|
||||
--count;
|
||||
}
|
||||
protected:
|
||||
Countable()
|
||||
{
|
||||
++count;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
rbx::atomic<int> Countable<T>::count;
|
||||
|
||||
} // namespace Diagnostics
|
||||
|
||||
} // namespace RBX
|
||||
Reference in New Issue
Block a user