GpgFrontend::SingletonStorage Class Reference
Collaboration diagram for GpgFrontend::SingletonStorage:

## Public Member Functions

void | ReleaseChannel (int channel)
ChannelObject * | FindObjectInChannel (int channel)
std::vector< int > | GetAllChannelId ()
| Get all the channel ids. More...
ChannelObject * | SetObjectInChannel (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 | ) |

Parameters

  channel |

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

## 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:

- src/core/GpgFunctionObject.h
- src/core/GpgFunctionObject.cpp