Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Mantid::Kernel::CreateUsingNew< T > Struct Template Reference

Policy class controlling creation of the singleton Implementation classes should mark their default constructors private and insert a friend declaration for this class, e.g.: More...

#include <SingletonHolder.h>

Static Public Member Functions

static T * create ()
 create an object using the new operator More...
 
static void destroy (T *p)
 delete an object instantiated using Create More...
 

Detailed Description

template<typename T>
struct Mantid::Kernel::CreateUsingNew< T >

Policy class controlling creation of the singleton Implementation classes should mark their default constructors private and insert a friend declaration for this class, e.g.:

friend struct Mantid::Kernel::CreateUsingNew<SingletonImplClass>;

Definition at line 67 of file SingletonHolder.h.

Member Function Documentation

◆ create()

template<typename T >
static T * Mantid::Kernel::CreateUsingNew< T >::create ( )
inlinestatic

create an object using the new operator

Returns
New instance

Definition at line 70 of file SingletonHolder.h.

Referenced by Mantid::Kernel::SingletonHolder< T >::Instance().

◆ destroy()

template<typename T >
static void Mantid::Kernel::CreateUsingNew< T >::destroy ( T *  p)
inlinestatic

delete an object instantiated using Create

Parameters
p:: pointer to instance to destroy

Definition at line 73 of file SingletonHolder.h.

Referenced by Mantid::Kernel::SingletonHolder< T >::Instance().


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