Jpp
test_elongated_shower_pde
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JLang
JSingleton.hh
Go to the documentation of this file.
1
#ifndef __JLANG__JSINGLETON__
2
#define __JLANG__JSINGLETON__
3
4
/**
5
* \author mdejong
6
*/
7
8
namespace
JLANG {}
9
namespace
JPP {
using namespace
JLANG; }
10
11
namespace
JLANG {
12
13
14
/**
15
* Simple singleton class.
16
*/
17
template
<
class
T>
18
struct
JSingleton
{
19
20
typedef
T
data_type
;
21
22
/**
23
* Get unique instance of template class.
24
*
25
* \return object
26
*/
27
static
data_type
&
getInstance
()
28
{
29
static
data_type
value;
30
31
return
value;
32
}
33
34
protected
:
35
/**
36
* Default constructor.
37
*/
38
JSingleton
()
39
{}
40
41
42
/**
43
* Copy constructor.
44
*/
45
JSingleton
(
const
JSingleton
&)
46
{}
47
48
private
:
49
JSingleton
&
operator=
(
const
JSingleton
&);
50
};
51
}
52
53
#endif
JLANG::JSingleton::JSingleton
JSingleton(const JSingleton &)
Copy constructor.
Definition:
JSingleton.hh:45
JLANG::JSingleton
Simple singleton class.
Definition:
JSingleton.hh:18
JLANG::JSingleton::JSingleton
JSingleton()
Default constructor.
Definition:
JSingleton.hh:38
JLANG::JSingleton::operator=
JSingleton & operator=(const JSingleton &)
T
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Definition:
JCalibrateHeight.sh:61
JLANG::JSingleton::data_type
T data_type
Definition:
JSingleton.hh:20
JLANG::JSingleton::getInstance
static data_type & getInstance()
Get unique instance of template class.
Definition:
JSingleton.hh:27
Generated by
1.8.5