LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Singleton< Object > Class Template Reference

Defines access method for the singleton pattern. More...

#include <common/AbstractFactoryPattern/Singleton.h>

Public Member Functions

 Singleton ()=default
 
virtual ~Singleton ()=default
 

Static Public Member Functions

static const Object & single ()
 const singleton accessor
 
static const Object * psingle ()
 
static Object & changeable ()
 singleton accessor
 
static Object * pchangeable ()
 

Detailed Description

template<typename Object>
class Lima::Singleton< Object >

Defines access method for the singleton pattern.

To ensure object is a singleton, it should have his only default constructor defined private.

defines a singleton

Author
Benoit Mathieu mathi.nosp@m.eub@.nosp@m.zoe.c.nosp@m.ea.f.nosp@m.r
Parameters
ObjectType of singleton Object

Definition at line 21 of file Singleton.h.

Constructor & Destructor Documentation

◆ Singleton()

template<typename Object >
Lima::Singleton< Object >::Singleton ( )
default

◆ ~Singleton()

template<typename Object >
virtual Lima::Singleton< Object >::~Singleton ( )
virtualdefault

Member Function Documentation

◆ changeable()

template<typename Object >
Object & Lima::Singleton< Object >::changeable ( )
static

singleton accessor

Definition at line 71 of file Singleton.h.

◆ pchangeable()

template<typename Object >
Object * Lima::Singleton< Object >::pchangeable ( )
static

Definition at line 81 of file Singleton.h.

◆ psingle()

template<typename Object >
const Object * Lima::Singleton< Object >::psingle ( )
static

Definition at line 61 of file Singleton.h.

◆ single()

template<typename Object >
const Object & Lima::Singleton< Object >::single ( )
static

const singleton accessor

Definition at line 51 of file Singleton.h.


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