MIRA
Public Types | Static Public Member Functions | Static Protected Member Functions | List of all members
LazyInstantiation< Trait > Class Template Reference

Implementation of the InstantiationPolicy that is used by the Singleton template. More...

#include <utils/Singleton.h>

Inheritance diagram for LazyInstantiation< Trait >:
Inheritance graph
[legend]

Public Types

typedef Base::Type Type
 

Static Public Member Functions

static Typeinstance ()
 

Static Protected Member Functions

static TypemakeInstance ()
 
static void destroyInstance (void)
 

Detailed Description

template<typename Trait>
class mira::singleton::LazyInstantiation< Trait >

Implementation of the InstantiationPolicy that is used by the Singleton template.

This policy ensures lazy instantiation, i.e. the singleton object will be instantiated at the moment when the instance() method is called for the first time. If the instance() method is never called, the singleton will never be instantiated.

Member Typedef Documentation

◆ Type

typedef Base::Type Type

Member Function Documentation

◆ instance()

static Type& instance ( )
inlinestatic

◆ makeInstance()

static Type* makeInstance ( )
inlinestaticprotected

◆ destroyInstance()

static void destroyInstance ( void  )
inlinestaticprotected

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