【新增】设备信息获取接口
This commit is contained in:
19
src/util/Singleton.h
Normal file
19
src/util/Singleton.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef SINGLETON_H
|
||||
#define SINGLETON_H
|
||||
|
||||
template <typename T>
|
||||
class Singleton {
|
||||
public:
|
||||
static T& GetInstance() {
|
||||
static T instance;
|
||||
return instance;
|
||||
}
|
||||
Singleton(const Singleton&) = delete;
|
||||
Singleton& operator=(const Singleton&) = delete;
|
||||
|
||||
protected:
|
||||
Singleton() {}
|
||||
~Singleton() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user