Files
tp/include/JSystem/JAudio2/JASGadget.h
T
2022-12-24 12:47:48 -07:00

24 lines
420 B
C++

#ifndef JASGADGET_H
#define JASGADGET_H
#include "dolphin/types.h"
template <class T>
class JASGlobalInstance {
public:
T* getInstance() { return sInstance; }
JASGlobalInstance(bool param) {
if (param) {
ASSERT(sInstance == 0);
if (this!=NULL) {
sInstance = this - sizeof(T);
}
}
}
static T* sInstance;
};
#endif /* JASGADGET_H */