GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::SingletonStorage Class Reference
Collaboration diagram for GpgFrontend::SingletonStorage:
Collaboration graph

Public Member Functions

void ReleaseChannel (int channel)
 
ChannelObjectFindObjectInChannel (int channel)
 
std::vector< int > GetAllChannelId ()
 Get all the channel ids. More...
 
ChannelObjectSetObjectInChannel (int channel, std::unique_ptr< ChannelObject > p_obj)
 Set a new object in channel object. More...
 

Private Attributes

std::shared_mutex instances_mutex_
 mutex for _instances_map
 
std::map< int, std::unique_ptr< ChannelObject > > instances_map_
 map of singleton instances
 

Member Function Documentation

◆ FindObjectInChannel()

GpgFrontend::ChannelObject * GpgFrontend::SingletonStorage::FindObjectInChannel ( int  channel)
Parameters
channel
Returns
T*

◆ GetAllChannelId()

std::vector< int > GpgFrontend::SingletonStorage::GetAllChannelId ( )

Get all the channel ids.

Returns
std::vector<int>

Referenced by GpgFrontend::SingletonFunctionObject< GpgContext >::GetAllChannelId().

◆ ReleaseChannel()

void GpgFrontend::SingletonStorage::ReleaseChannel ( int  channel)

◆ SetObjectInChannel()

GpgFrontend::ChannelObject * GpgFrontend::SingletonStorage::SetObjectInChannel ( int  channel,
std::unique_ptr< ChannelObject p_obj 
)

Set a new object in channel object.

Parameters
channel
p_obj
Returns
T*

References GpgFrontend::ChannelObject::SetChannel().


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