GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
#include <GpgFunctionObject.h>
Public Member Functions | |
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 |
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< T >(void)> factory) |
Create a Instance object. More... | |
static T & | CreateInstance (int channel, std::unique_ptr< T > p_obj=nullptr) |
Create a Instance object. More... | |
static T & | ReleaseChannel (int channel) |
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. | |
void | SetChannel (int channel) |
Set the Channel object. More... | |
Static Private Member Functions | |
static T * | find_object_in_channel (int channel) |
static T * | set_object_in_channel (int channel, std::unique_ptr< T > p_obj) |
Set the object in channel object. More... | |
Private Attributes | |
int | channel_ = _default_channel |
Static Private Attributes | |
static int | _default_channel |
static std::mutex | _instance_mutex |
static std::shared_mutex | _instances_mutex |
static std::unique_ptr< T > | _instance = nullptr |
static std::map< int, std::unique_ptr< T > > | _instances_map |
T |
|
inlineexplicitprotected |
Construct a new Singleton Function Object object.
channel |
|
inlinestatic |
Create a Instance object.
channel | |
factory |
References GpgFrontend::SingletonFunctionObject< T >::find_object_in_channel(), and GpgFrontend::SingletonFunctionObject< T >::set_object_in_channel().
|
inlinestatic |
Create a Instance object.
channel | |
p_obj |
References GpgFrontend::SingletonFunctionObject< T >::find_object_in_channel(), and GpgFrontend::SingletonFunctionObject< T >::set_object_in_channel().
|
inlinestaticprivate |
channel |
Referenced by GpgFrontend::SingletonFunctionObject< T >::CreateInstance(), and GpgFrontend::SingletonFunctionObject< T >::GetInstance().
|
inline |
Get the Channel object.
|
inlinestatic |
Get the Default Channel object.
|
inlinestatic |
Get the Instance object.
channel |
References GpgFrontend::SingletonFunctionObject< T >::find_object_in_channel(), and GpgFrontend::SingletonFunctionObject< T >::set_object_in_channel().
|
inlinestatic |
channel |
|
inlinestaticprivate |
Set the object in channel object.
channel | |
p_obj |
Referenced by GpgFrontend::SingletonFunctionObject< T >::CreateInstance(), and GpgFrontend::SingletonFunctionObject< T >::GetInstance().
|
inlineprotected |
Set the Channel object.
channel |
|
staticprivate |