Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
flutter::PluginRegistrar Class Reference

#include <plugin_registrar.h>

Inheritance diagram for flutter::PluginRegistrar:
flutter::PluginRegistrarGlfw flutter::PluginRegistrarWindows

Public Member Functions

 PluginRegistrar (FlutterDesktopPluginRegistrarRef core_registrar)
 
virtual ~PluginRegistrar ()
 
 PluginRegistrar (PluginRegistrar const &)=delete
 
PluginRegistraroperator= (PluginRegistrar const &)=delete
 
BinaryMessengermessenger ()
 
TextureRegistrartexture_registrar ()
 
void AddPlugin (std::unique_ptr< Plugin > plugin)
 

Protected Member Functions

FlutterDesktopPluginRegistrarRef registrar () const
 
void ClearPlugins ()
 

Detailed Description

Definition at line 27 of file plugin_registrar.h.

Constructor & Destructor Documentation

◆ PluginRegistrar() [1/2]

flutter::PluginRegistrar::PluginRegistrar ( FlutterDesktopPluginRegistrarRef  core_registrar)
explicit

Definition at line 19 of file plugin_registrar.cc.

20 : registrar_(registrar) {
21 auto core_messenger = FlutterDesktopPluginRegistrarGetMessenger(registrar_);
22 messenger_ = std::make_unique<BinaryMessengerImpl>(core_messenger);
23
26 texture_registrar_ =
27 std::make_unique<TextureRegistrarImpl>(texture_registrar);
28}
TextureRegistrar * texture_registrar()
FlutterDesktopPluginRegistrarRef registrar() const
FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar(FlutterDesktopPluginRegistrarRef registrar)
FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger(FlutterDesktopPluginRegistrarRef registrar)

◆ ~PluginRegistrar()

flutter::PluginRegistrar::~PluginRegistrar ( )
virtual

Definition at line 30 of file plugin_registrar.cc.

30 {
31 // This must always be the first call.
33
34 // Explicitly cleared to facilitate testing of destruction order.
35 messenger_.reset();
36}

◆ PluginRegistrar() [2/2]

flutter::PluginRegistrar::PluginRegistrar ( PluginRegistrar const &  )
delete

Member Function Documentation

◆ AddPlugin()

void flutter::PluginRegistrar::AddPlugin ( std::unique_ptr< Plugin plugin)

Definition at line 38 of file plugin_registrar.cc.

38 {
39 plugins_.insert(std::move(plugin));
40}

◆ ClearPlugins()

void flutter::PluginRegistrar::ClearPlugins ( )
protected

Definition at line 42 of file plugin_registrar.cc.

42 {
43 plugins_.clear();
44}

◆ messenger()

BinaryMessenger * flutter::PluginRegistrar::messenger ( )
inline

Definition at line 43 of file plugin_registrar.h.

43{ return messenger_.get(); }

◆ operator=()

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

◆ registrar()

FlutterDesktopPluginRegistrarRef flutter::PluginRegistrar::registrar ( ) const
inlineprotected

Definition at line 57 of file plugin_registrar.h.

57{ return registrar_; }

◆ texture_registrar()

TextureRegistrar * flutter::PluginRegistrar::texture_registrar ( )
inline

Definition at line 47 of file plugin_registrar.h.

47{ return texture_registrar_.get(); }

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