versadac
1
versadac - Scalable Recorder Firmware
Main Page
Classes
Files
File List
File Members
core
libjson
_internal
Source
JSONSingleton.h
1
#ifndef JSONSINGLETON_H
2
#define JSONSINGLETON_H
3
4
template
<
typename
T>
class
JSONSingleton
{
5
public
:
6
static
inline
T
get
(void){
7
return
get_singleton() -> ptr;
8
}
9
static
inline
void
set(T p){
10
get_singleton() -> ptr = p;
11
}
12
private
:
13
inline
JSONSingleton
() : ptr(NULL) { }
14
JSONSingleton
(
const
JSONSingleton<T>
&);
15
JSONSingleton<T>
operator = (
const
JSONSingleton<T>
&);
16
static
inline
JSONSingleton<T>
* get_singleton(
void
){
17
static
JSONSingleton<T>
instance;
18
return
&instance;
19
}
20
T ptr;
21
};
22
23
#endif
JSONSingleton
Definition:
JSONSingleton.h:4
Generated on Wed Aug 19 2020 10:33:42 for versadac by
1.8.9.1