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

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

#include <utils/Singleton.h>

Inheritance diagram for EagerInstantiation< 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::EagerInstantiation< Trait >

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

This policy ensures early/eager instantiation, i.e. the singleton object will be instantiated BEFORE the first line of the applications main() function is executed. This is useful, if the singleton must do some initialization as early as possible. Please note, that the singleton will not be instantiated if the instance() method is never called!

Member Typedef Documentation

◆ Type

typedef Base::Type Type

Member Function Documentation

◆ instance()

static Type& instance ( )
inlinestatic

◆ makeInstance()

static Type* makeInstance ( )
inlinestaticprotectedinherited

◆ destroyInstance()

static void destroyInstance ( void  )
inlinestaticprotectedinherited

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