# Poco::Net

# class PrivateKeyFactoryMgr

Library: NetSSL_OpenSSL
Package: SSLCore
Header: Poco/Net/PrivateKeyFactoryMgr.h

## Description

A PrivateKeyFactoryMgr manages all existing PrivateKeyFactories.

## Member Summary

Member Functions: getFactory, hasFactory, removeFactory, setFactory

## Types Aliases

### FactoriesMap

using FactoriesMap = std::map < std::string, Poco::SharedPtr < PrivateKeyFactory >>;

## Constructors

### PrivateKeyFactoryMgr

PrivateKeyFactoryMgr();

Creates the PrivateKeyFactoryMgr.

## Destructor

### ~PrivateKeyFactoryMgr

~PrivateKeyFactoryMgr();

Destroys the PrivateKeyFactoryMgr.

## Member Functions

### getFactory

const PrivateKeyFactory * getFactory(
const std::string & name
) const;

Returns NULL if for the given name a factory does not exist, otherwise the factory is returned

### hasFactory

bool hasFactory(
const std::string & name
) const;

Returns true if for the given name a factory is already registered

### removeFactory

void removeFactory(
const std::string & name
);

Removes the factory from the manager.

### setFactory

void setFactory(
const std::string & name,
PrivateKeyFactory * pFactory
);

Registers the factory. Class takes ownership of the pointer. If a factory with the same name already exists, an exception is thrown.