- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FUtils/FUSingleton.h File Reference

This file contains the FUSingleton template class. More...

Go to the source code of this file.

## Defines
#define | DeclareSingletonClass(_SingletonClass)
| A Singleton class.
#define | ImplementSingletonClass(_SingletonClass)
| Implements once the singleton pointer container.

## Detailed Description

This file contains the FUSingleton template class.

## Define Documentation

#define ImplementSingletonClass | ( | _SingletonClass |  | ) |

| Value:
    _SingletonClass* _SingletonClass::CreateSingleton() { \
            FUAssert(singleton == NULL, return singleton); \
            return singleton = new _SingletonClass(); } \
        void _SingletonClass::DestroySingleton() { \
            FUAssert(singleton != NULL, return); \
            SAFE_DELETE(singleton); } \
        _SingletonClass* _SingletonClass::singleton = NULL
  Implements once the singleton pointer container. Parameters:
  | _SingletonClass | The class name for the singleton class.