GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
GpgFrontend::SingletonFunctionObject< T > Class Template Reference

`#include <GpgFunctionObject.h>`

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

## Public Member Functions
| SingletonFunctionObject (const SingletonFunctionObject< T > &)=delete
| prohibit copy
SingletonFunctionObject & | operator= (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 | ) |
| inline explicit protected

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
| ) |  |
| inline static

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 | ( |  | ) |
| inline static

Get all the channel ids.

Returns
  std::vector<int>

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

## ◆ 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 | ( |  | ) |
| inline static

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` | ) |
| inline static

Get the Instance object.

Parameters

  channel |

Returns
  T&

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

## ◆ 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 | ) |
| inline static

Parameters

  channel |

Returns
  T&

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

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

- src/core/GpgFunctionObject.h