Flutter Engine
flutter::PluginRegistrarManager Class Reference

#include <plugin_registrar.h>

Public Member Functions

 PluginRegistrarManager (PluginRegistrarManager const &)=delete
 
PluginRegistrarManageroperator= (PluginRegistrarManager const &)=delete
 
template<class T >
T * GetRegistrar (FlutterDesktopPluginRegistrarRef registrar_ref)
 
void Reset ()
 

Static Public Member Functions

static PluginRegistrarManagerGetInstance ()
 

Detailed Description

Definition at line 79 of file plugin_registrar.h.

Constructor & Destructor Documentation

◆ PluginRegistrarManager()

flutter::PluginRegistrarManager::PluginRegistrarManager ( PluginRegistrarManager const &  )
delete

Member Function Documentation

◆ GetInstance()

PluginRegistrarManager * flutter::PluginRegistrarManager::GetInstance ( )
static

Definition at line 43 of file plugin_registrar.cc.

References flutter::PluginRegistrar::registrar().

Referenced by flutter::TEST().

43  {
44  static PluginRegistrarManager* instance = new PluginRegistrarManager();
45  return instance;
46 }
PluginRegistrarManager(PluginRegistrarManager const &)=delete

◆ GetRegistrar()

template<class T >
T* flutter::PluginRegistrarManager::GetRegistrar ( FlutterDesktopPluginRegistrarRef  registrar_ref)
inline

Definition at line 95 of file plugin_registrar.h.

References FlutterDesktopPluginRegistrarSetDestructionHandler().

Referenced by flutter::TEST().

95  {
96  auto insert_result =
97  registrars_.emplace(registrar_ref, std::make_unique<T>(registrar_ref));
98  auto& registrar_pair = *(insert_result.first);
100  OnRegistrarDestroyed);
101  return static_cast<T*>(registrar_pair.second.get());
102  }
void FlutterDesktopPluginRegistrarSetDestructionHandler(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopOnPluginRegistrarDestroyed callback)

◆ operator=()

PluginRegistrarManager& flutter::PluginRegistrarManager::operator= ( PluginRegistrarManager const &  )
delete

◆ Reset()

void flutter::PluginRegistrarManager::Reset ( )
inline

Definition at line 107 of file plugin_registrar.h.

References flutter::PluginRegistrar::registrar().

Referenced by flutter::TEST().

107 { registrars_.clear(); }

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