Main Page Namespace List Class Hierarchy Compound List Compound Members

# ZThread::StaticSingleton Class Template Reference

`#include <Singleton.h>`

List of all members.

## Static Public Methods
LONESOME* | instance ()

## Detailed Description

### template<class LONESOME> class ZThread::StaticSingleton

Author:
  Eric Crahen

Date:
  06-07-2000

Version:
  1.1.1

This is an alternative implementation of a Singleton that really does not require any form of locking. The Singleton objects are statically initialized. This is quite useful for things like State objects. This was implemented because a state machine problem I was working on and it seemed appropriate to include support for a more lightweight Singleton.

## Member Function Documentation

LONESOME * instance ( | )`[inline, static]`

| Get the statically initialized instance of type LONESOME Returns: LONESOME* - static instance

The documentation for this class was generated from the following file:

- Singleton.h