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
 
auto operator= (const SingletonFunctionObject< T > &) -> SingletonFunctionObject &=delete
 prohibit copy More...
 
auto GetChannel () const -> int
 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.
 
virtual ~ChannelObject () noexcept
 Destroy the Channel Object object.
 
 ChannelObject (int channel, QString type)
 Construct a new Channel Object object. More...
 
auto GetChannel () const -> int
 Get the Channel object. More...
 
void SetChannel (int channel)
 Set the Channel object. More...
 

Static Public Member Functions

static auto GetInstance (int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> T &
 Get the Instance object. More...
 
static auto CreateInstance (int channel, const std::function< ChannelObjectPtr(void)> &factory) -> T &
 Create a Instance object. More...
 
static void ReleaseChannel (int channel)
 
static auto GetDefaultChannel () -> int
 Get the Default Channel object. More...
 
static auto GetAllChannelId () -> std::vector< int >
 Get all the channel ids. More...
 
- Static Public Member Functions inherited from GpgFrontend::ChannelObject
static auto GetDefaultChannel () -> int
 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 auto GpgFrontend::SingletonFunctionObject< T >::CreateInstance ( int  channel,
const std::function< ChannelObjectPtr(void)> &  factory 
) -> T&
inlinestatic

Create a Instance object.

Parameters
channel
factory
Returns
T&

◆ GetAllChannelId()

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

Get all the channel ids.

Returns
std::vector<int>

References GpgFrontend::SingletonStorageCollection::GetInstance().

◆ GetChannel()

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

Get the Channel object.

Returns
int

References GpgFrontend::ChannelObject::GetChannel().

◆ GetDefaultChannel()

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

Get the Default Channel object.

Returns
int

References GpgFrontend::ChannelObject::GetDefaultChannel().

◆ GetInstance()

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

Get the Instance object.

Parameters
channel
Returns
T&

References GpgFrontend::GetChannelObjectInstance().

◆ operator=()

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

prohibit copy

Returns
SingletonFunctionObject&

◆ ReleaseChannel()

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

References GpgFrontend::SingletonStorageCollection::GetInstance().


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