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 InvokeAction (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 , 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::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 49 of file api_plugin_manager.h.

Member Enumeration Documentation

◆ JOB_TYPE

enum class API_PLUGIN_MANAGER::JOB_TYPE
strongprivate
Enumerator
CREATE_ENV 
INSTALL_REQUIREMENTS 

Definition at line 88 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

◆ GetActionsForScope()

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

Definition at line 230 of file api_plugin_manager.cpp.

References m_actionsCache, and m_readyPlugins.

Referenced by EDA_DRAW_FRAME::addApiPluginTools().

◆ InvokeAction()

◆ MenuBindings()

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

Definition at line 62 of file api_plugin_manager.h.

◆ processNextJob()

◆ processPluginDependencies()

◆ ReloadPlugins()

Member Data Documentation

◆ m_actionsCache

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

Definition at line 75 of file api_plugin_manager.h.

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

◆ m_buttonBindings

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

Map of button wx item id to action identifier.

Definition at line 81 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 78 of file api_plugin_manager.h.

Referenced by processPluginDependencies(), and ReloadPlugins().

◆ m_jobs

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

Definition at line 102 of file api_plugin_manager.h.

Referenced by processNextJob(), and processPluginDependencies().

◆ m_menuBindings

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

Map of menu wx item id to action identifier.

Definition at line 84 of file api_plugin_manager.h.

Referenced by ReloadPlugins().

◆ m_parent

wxEvtHandler* API_PLUGIN_MANAGER::m_parent
private

Definition at line 69 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 71 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 73 of file api_plugin_manager.h.

Referenced by ReloadPlugins().

◆ m_readyPlugins

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

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