MIRA
Static Public Member Functions | List of all members
CreateStatic< T > Struct Template Reference

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

#include <utils/Singleton.h>

Static Public Member Functions

static T * create ()
 
static void destroy (T *p)
 

Detailed Description

template<typename T>
struct mira::singleton::CreateStatic< T >

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

This policy creates the singleton object in static memory, i.e. without allocating memory. Instead, the memory is provided by the compiler at compile time.

Note
The class you want to create as a singleton needs a public default constructor. In case of a private constructor you need to add this struct as a friend.

Member Function Documentation

◆ create()

static T* create ( )
inlinestatic

◆ destroy()

static void destroy ( T *  p)
inlinestatic

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