Singleton base class.
More...
Go to the source code of this file.
Detailed Description
Singleton base class.
- LastChangedDate:
- 2011-04-09 21:58:06 -0400 (Sat, 09 Apr 2011)
- Author:
- Jim E. Brooks http://www.palomino3d.org
Define Documentation
| #define AUTO_LOCK_GET_INSTANCE |
| #define AUTO_LOCK_SINGLETON |
| #define DECLARE_SINGLETON_CLASS_VARS |
( |
|
CLASS |
) |
CLASS_VAR CLASS* msInstance; |
| #define DEFINE_GetInstance |
( |
|
CLASS |
) |
|
Value:CLASS_METHOD CLASS& GetInstance( void ) \
{ \
AUTO_LOCK_GET_INSTANCE; \
if ( UX( msInstance == NULL ) ) \
msInstance = new CLASS; \
return *msInstance; \
}
| #define DEFINE_SINGLETON_CLASS_VARS |
( |
|
CLASS |
) |
CLASS* CLASS::msInstance; |