OpenTTD Source: ProviderManager< TProviderType > Class Template Reference

OpenTTD Source 15.3

Public Member Functions | Static Public Member Functions
ProviderManager< TProviderType > Class Template Reference

The ProviderManager manages a single Provider-type. More...

`#include <provider_manager.h>`

## Public Member Functions
| ProviderManager (ProviderManager const &)=delete
ProviderManager & | operator= (ProviderManager const &)=delete

## Static Public Member Functions
static void | Register (const TProviderType &instance)
static void | Unregister (const TProviderType &instance)
static std::vector< const TProviderType * > & | GetProviders ()
| Get the currently known providers.

## Detailed Description

template<typename TProviderType>
class ProviderManager< TProviderType >

The ProviderManager manages a single Provider-type.

It allows for automatic registration and unregistration of providers.

Template Parameters

  T | Service provider type.

Definition at line 21 of file provider_manager.h.

## Member Function Documentation

## ◆ GetProviders()

template<typename TProviderType >

static std::vector< const TProviderType * > & ProviderManager< TProviderType >::GetProviders | ( |  | ) |
| inlinestatic

Get the currently known providers.

Returns
  The known providers.

Definition at line 46 of file provider_manager.h.

Referenced by GetScreenshotProvider().

## ◆ Register()

template<typename TProviderType >

static void ProviderManager< TProviderType >::Register | ( | const TProviderType & | instance | ) |
| inlinestatic

Definition at line 28 of file provider_manager.h.

## ◆ Unregister()

template<typename TProviderType >

static void ProviderManager< TProviderType >::Unregister | ( | const TProviderType & | instance | ) |
| inlinestatic

Definition at line 36 of file provider_manager.h.

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

- src/provider_manager.h