mirror of
https://github.com/zeldaret/tp
synced 2026-05-28 08:25:48 -04:00
52d84413bb
* daalink / z2linkmgr wip * first cleanup of JASGlobalInstance data * fix sInstance stuff part 2 * more d_a_alink_swim work * remove asm
25 lines
399 B
C++
25 lines
399 B
C++
#ifndef JASGADGET_H
|
|
#define JASGADGET_H
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
template<class T>
|
|
class JASGlobalInstance {
|
|
public:
|
|
JASGlobalInstance(T* inst) {
|
|
sInstance = inst;
|
|
}
|
|
|
|
~JASGlobalInstance() {
|
|
if (this == sInstance) {
|
|
sInstance = NULL;
|
|
}
|
|
}
|
|
|
|
static T* getInstance() { return sInstance; }
|
|
|
|
static T* sInstance;
|
|
};
|
|
|
|
#endif /* JASGADGET_H */
|