KiCad PCB EDA Suite
Loading...
Searching...
No Matches
API_PLUGIN_MANAGER Class Reference

Responsible for loading plugin definitions for API-based plugins (ones that do not run inside KiCad itself, but instead are launched as external processes by KiCad) More...

#include <api_plugin_manager.h>

Inheritance diagram for API_PLUGIN_MANAGER:

Classes

struct  JOB
 

Public Member Functions

 API_PLUGIN_MANAGER (wxEvtHandler *aParent)
 
void ReloadPlugins ()
 
void RecreatePluginEnvironment (const wxString &aIdentifier)
 
void InvokeAction (const wxString &aIdentifier)
 
std::optional< const PLUGIN_ACTION * > GetAction (const wxString &aIdentifier)
 
std::vector< const PLUGIN_ACTION * > GetActionsForScope (PLUGIN_ACTION_SCOPE aScope)
 
std::map< int, wxString > & ButtonBindings ()
 
std::map< int, wxString > & MenuBindings ()
 

Private Types

enum class  JOB_TYPE { CREATE_ENV , SETUP_ENV , INSTALL_REQUIREMENTS }
 

Private Member Functions

void processPluginDependencies ()
 
void processNextJob (wxCommandEvent &aEvent)
 

Private Attributes

wxEvtHandler * m_parent
 
std::set< std::unique_ptr< API_PLUGIN >, CompareApiPluginIdentifiersm_plugins
 
std::map< wxString, const API_PLUGIN * > m_pluginsCache
 
std::map< wxString, const PLUGIN_ACTION * > m_actionsCache
 
std::map< wxString, wxString > m_environmentCache
 Map of plugin identifier to a path for the plugin's virtual environment, if it has one.
 
std::map< int, wxString > m_buttonBindings
 Map of button wx item id to action identifier.
 
std::map< int, wxString > m_menuBindings
 Map of menu wx item id to action identifier.
 
std::set< wxString > m_readyPlugins
 
std::set< wxString > m_busyPlugins
 
std::deque< JOBm_jobs
 

Detailed Description

Responsible for loading plugin definitions for API-based plugins (ones that do not run inside KiCad itself, but instead are launched as external processes by KiCad)

Definition at line 40 of file api_plugin_manager.h.

Member Enumeration Documentation

◆ JOB_TYPE

enum class API_PLUGIN_MANAGER::JOB_TYPE
strongprivate
Enumerator
CREATE_ENV 
SETUP_ENV 
INSTALL_REQUIREMENTS 

Definition at line 85 of file api_plugin_manager.h.

Constructor & Destructor Documentation

◆ API_PLUGIN_MANAGER()

API_PLUGIN_MANAGER::API_PLUGIN_MANAGER ( wxEvtHandler *  aParent)

Definition at line 41 of file api_plugin_manager.cpp.

References processNextJob().

Member Function Documentation

◆ ButtonBindings()

std::map< int, wxString > & API_PLUGIN_MANAGER::ButtonBindings ( )
inline

◆ GetAction()

std::optional< const PLUGIN_ACTION * > API_PLUGIN_MANAGER::GetAction ( const wxString &  aIdentifier)

◆ GetActionsForScope()

std::vector< const PLUGIN_ACTION * > API_PLUGIN_MANAGER::GetActionsForScope ( PLUGIN_ACTION_SCOPE  aScope)

Definition at line 298 of file api_plugin_manager.cpp.

References m_actionsCache, and m_readyPlugins.

Referenced by EDA_DRAW_FRAME::GetOrderedPluginActions().

◆ InvokeAction()

◆ MenuBindings()

std::map< int, wxString > & API_PLUGIN_MANAGER::MenuBindings ( )
inline

Definition at line 57 of file api_plugin_manager.h.

◆ processNextJob()

◆ processPluginDependencies()

◆ RecreatePluginEnvironment()

◆ ReloadPlugins()

Member Data Documentation

◆ m_actionsCache

std::map<wxString, const PLUGIN_ACTION*> API_PLUGIN_MANAGER::m_actionsCache
private

Definition at line 70 of file api_plugin_manager.h.

Referenced by GetAction(), GetActionsForScope(), InvokeAction(), and ReloadPlugins().

◆ m_busyPlugins

std::set<wxString> API_PLUGIN_MANAGER::m_busyPlugins
private

Definition at line 83 of file api_plugin_manager.h.

Referenced by processNextJob(), and processPluginDependencies().

◆ m_buttonBindings

std::map<int, wxString> API_PLUGIN_MANAGER::m_buttonBindings
private

Map of button wx item id to action identifier.

Definition at line 76 of file api_plugin_manager.h.

Referenced by ReloadPlugins().

◆ m_environmentCache

std::map<wxString, wxString> API_PLUGIN_MANAGER::m_environmentCache
private

Map of plugin identifier to a path for the plugin's virtual environment, if it has one.

Definition at line 73 of file api_plugin_manager.h.

Referenced by processPluginDependencies(), and ReloadPlugins().

◆ m_jobs

std::deque<JOB> API_PLUGIN_MANAGER::m_jobs
private

◆ m_menuBindings

std::map<int, wxString> API_PLUGIN_MANAGER::m_menuBindings
private

Map of menu wx item id to action identifier.

Definition at line 79 of file api_plugin_manager.h.

Referenced by ReloadPlugins().

◆ m_parent

wxEvtHandler* API_PLUGIN_MANAGER::m_parent
private

Definition at line 64 of file api_plugin_manager.h.

Referenced by ReloadPlugins().

◆ m_plugins

std::set<std::unique_ptr<API_PLUGIN>, CompareApiPluginIdentifiers> API_PLUGIN_MANAGER::m_plugins
private

Definition at line 66 of file api_plugin_manager.h.

Referenced by processPluginDependencies(), and ReloadPlugins().

◆ m_pluginsCache

std::map<wxString, const API_PLUGIN*> API_PLUGIN_MANAGER::m_pluginsCache
private

Definition at line 68 of file api_plugin_manager.h.

Referenced by RecreatePluginEnvironment(), and ReloadPlugins().

◆ m_readyPlugins

std::set<wxString> API_PLUGIN_MANAGER::m_readyPlugins
private

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