GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::SingletonFunctionObject< T > Class Template Reference

#include <GpgFunctionObject.h>

Inheritance diagram for GpgFrontend::SingletonFunctionObject< T >:
Inheritance graph
Collaboration diagram for GpgFrontend::SingletonFunctionObject< T >:
Collaboration graph

Public Member Functions

 SingletonFunctionObject (const SingletonFunctionObject< T > &)=delete
 prohibit copy
 
SingletonFunctionObjectoperator= (const SingletonFunctionObject< T > &)=delete
 prohibit copy More...
 
int GetChannel () const
 Get the Channel object. More...
 
 SingletonFunctionObject (T &&)=delete
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (const T &)=delete
 Construct a new Singleton Function Object object.
 
void operator= (const T &)=delete
 
- Public Member Functions inherited from GpgFrontend::ChannelObject
 ChannelObject () noexcept
 Construct a new Default Channel Object object.
 
 ChannelObject (int channel)
 Construct a new Channel Object object. More...
 
int GetChannel () const
 Get the Channel object. More...
 
void SetChannel (int channel)
 Set the Channel object. More...
 

Static Public Member Functions

static T & GetInstance (int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
 Get the Instance object. More...
 
static T & CreateInstance (int channel, std::function< std::unique_ptr< ChannelObject >(void)> factory)
 Create a Instance object. More...
 
static void ReleaseChannel (int channel)
 
static int GetDefaultChannel ()
 Get the Default Channel object. More...
 
static std::vector< int > GetAllChannelId ()
 Get all the channel ids. More...
 
- Static Public Member Functions inherited from GpgFrontend::ChannelObject
static int GetDefaultChannel ()
 Get the Default Channel object. More...
 

Protected Member Functions

 SingletonFunctionObject ()=default
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (int channel)
 Construct a new Singleton Function Object object. More...
 
virtual ~SingletonFunctionObject ()=default
 Destroy the Singleton Function Object object.
 

Detailed Description

template<typename T>
class GpgFrontend::SingletonFunctionObject< T >

Template Parameters
T

Constructor & Destructor Documentation

◆ SingletonFunctionObject()

template<typename T >
GpgFrontend::SingletonFunctionObject< T >::SingletonFunctionObject ( int  channel)
inlineexplicitprotected

Construct a new Singleton Function Object object.

Parameters
channel

Member Function Documentation

◆ CreateInstance()

template<typename T >
static T& GpgFrontend::SingletonFunctionObject< T >::CreateInstance ( int  channel,
std::function< std::unique_ptr< ChannelObject >(void)>  factory 
)
inlinestatic

Create a Instance object.

Parameters
channel
factory
Returns
T&

References GpgFrontend::SingletonStorageCollection::GetInstance(), and GpgFrontend::SingletonStorageCollection::GetSingletonStorage().

◆ GetAllChannelId()

template<typename T >
static std::vector<int> GpgFrontend::SingletonFunctionObject< T >::GetAllChannelId ( )
inlinestatic

◆ GetChannel()

template<typename T >
int GpgFrontend::SingletonFunctionObject< T >::GetChannel ( ) const
inline

Get the Channel object.

Returns
int

References GpgFrontend::ChannelObject::GetChannel().

◆ GetDefaultChannel()

template<typename T >
static int GpgFrontend::SingletonFunctionObject< T >::GetDefaultChannel ( )
inlinestatic

Get the Default Channel object.

Returns
int

References GpgFrontend::ChannelObject::GetDefaultChannel().

◆ GetInstance()

template<typename T >
static T& GpgFrontend::SingletonFunctionObject< T >::GetInstance ( int  channel = GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
inlinestatic

◆ operator=()

template<typename T >
SingletonFunctionObject& GpgFrontend::SingletonFunctionObject< T >::operator= ( const SingletonFunctionObject< T > &  )
delete

prohibit copy

Returns
SingletonFunctionObject&

◆ ReleaseChannel()

template<typename T >
static void GpgFrontend::SingletonFunctionObject< T >::ReleaseChannel ( int  channel)
inlinestatic

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