1
///////////////////////////////////////////////////////////////////////////////
2
// Name: fnb_singleton.h
3
// Purpose: A template class that implements the wxFNBSingleton pattern.
4
// Author: Eran Ifrah <erani.ifrah@gmail.com>
6
// Modified: 01/01/2006
7
// Copyright: Eran Ifrah (c)
8
// Licence: wxWindows license <http://www.wxwidgets.org/licence3.txt>
9
///////////////////////////////////////////////////////////////////////////////
10
#ifndef FNB_SINGLETON_H
11
#define FNB_SINGLETON_H
14
* A template class that implements the wxFNBSingleton pattern.
22
static T* ms_instance;
25
* Static method to access the only pointer of this instance.
26
* \return a pointer to the only instance of this
37
* Default constructor.
44
virtual ~wxFNBSingleton();
47
T* wxFNBSingleton<T>::ms_instance = 0;
50
wxFNBSingleton<T>::wxFNBSingleton()
55
wxFNBSingleton<T>::~wxFNBSingleton()
60
T* wxFNBSingleton<T>::Get()
63
ms_instance = new T();
68
void wxFNBSingleton<T>::Free()
77
#endif // FNB_SINGLETON_H