toast::singleton_helper< T, HolderType, FactoryType, Enable > Class Template Reference
[toast singleton]

#include <toast/singleton.hpp>

List of all members.


Detailed Description

template<typename T, typename HolderType = boost::optional<T>, typename FactoryType = toast::default_factory<T>, typename Enable = void>
class toast::singleton_helper< T, HolderType, FactoryType, Enable >

This helper deals with all the accounting details of properly managing a singleton.

The part it doesn't help with is when it is appropriate to use a singleton. Read on for that help.

Public Types

typedef T type

Static Public Member Functions

static void force_init ()
static T & instance ()
static void set_factory (toast::typed_factory< T > const &f)
 set the singleton's factory function


Member Function Documentation

template<typename T, typename HolderType = boost::optional<T>, typename FactoryType = toast::default_factory<T>, typename Enable = void>
static T& toast::singleton_helper< T, HolderType, FactoryType, Enable >::instance (  )  [inline, static]


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

SourceForge.net Logo