|
KiCad PCB EDA Suite
|
#include <3d_plugin_manager.h>
Public Member Functions | |
| S3D_PLUGIN_MANAGER () | |
| virtual | ~S3D_PLUGIN_MANAGER () |
| std::list< wxString > const * | GetFileFilters (void) const noexcept |
| Return the list of file filters; this will contain at least the default "All Files (*.*)|*.*" and the file filters supported by any available plugins. | |
| SCENEGRAPH * | Load3DModel (const wxString &aFileName, std::string &aPluginInfo) |
| void | ClosePlugins (void) |
| Iterate through all discovered plugins and closes them to reclaim memory. | |
| bool | CheckTag (const char *aTag) |
| Check the given tag and returns true if the plugin named in the tag is not loaded or the plugin is loaded and the version matches. | |
Private Member Functions | |
| void | loadPlugins (void) |
| load plugins | |
| void | listPlugins (const wxString &aPath, std::list< wxString > &aPluginList) |
| list potential plugins | |
| void | checkPluginName (const wxString &aPath, std::list< wxString > &aPluginList) |
| check the existence of a plugin name and add it to the list | |
| void | checkPluginPath (const wxString &aPath, std::list< wxString > &aSearchList) |
| check the existence of a path and add it to the path search list | |
| void | addFilterString (const wxString &aFilterString) |
| add an entry to the file filter list | |
| void | addExtensionMap (KICAD_PLUGIN_LDR_3D *aPlugin) |
| add entries to the extension map | |
Private Attributes | |
| std::list< KICAD_PLUGIN_LDR_3D * > | m_Plugins |
| list of discovered plugins | |
| std::multimap< const wxString, KICAD_PLUGIN_LDR_3D * > | m_ExtMap |
| mapping of extensions to available plugins | |
| std::list< wxString > | m_FileFilters |
| list of file filters | |
Definition at line 38 of file 3d_plugin_manager.h.
| S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER | ( | ) |
Definition at line 51 of file 3d_plugin_manager.cpp.
References _, loadPlugins(), m_ExtMap, m_FileFilters, and MASK_3D_PLUGINMGR.
|
virtual |
Definition at line 101 of file 3d_plugin_manager.cpp.
References m_Plugins.
|
private |
add entries to the extension map
Definition at line 398 of file 3d_plugin_manager.cpp.
References KICAD_PLUGIN_LDR_3D::GetModelExtension(), KICAD_PLUGIN_LDR_3D::GetNExtensions(), m_ExtMap, and MASK_3D_PLUGINMGR.
Referenced by loadPlugins().
|
private |
add an entry to the file filter list
Definition at line 376 of file 3d_plugin_manager.cpp.
References m_FileFilters.
Referenced by loadPlugins().
|
private |
check the existence of a plugin name and add it to the list
Definition at line 302 of file 3d_plugin_manager.cpp.
References ExpandEnvVarSubstitutions(), FN_NORMALIZE_FLAGS, MASK_3D_PLUGINMGR, and path.
Referenced by listPlugins().
|
private |
check the existence of a path and add it to the path search list
Definition at line 343 of file 3d_plugin_manager.cpp.
References FN_NORMALIZE_FLAGS, MASK_3D_PLUGINMGR, and path.
Referenced by loadPlugins().
| bool S3D_PLUGIN_MANAGER::CheckTag | ( | const char * | aTag | ) |
Check the given tag and returns true if the plugin named in the tag is not loaded or the plugin is loaded and the version matches.
Definition at line 493 of file 3d_plugin_manager.cpp.
References m_Plugins.
Referenced by checkTag().
| void S3D_PLUGIN_MANAGER::ClosePlugins | ( | void | ) |
Iterate through all discovered plugins and closes them to reclaim memory.
The individual plugins will be automatically reloaded as calls are made to load specific models.
Definition at line 477 of file 3d_plugin_manager.cpp.
References m_Plugins, and MASK_3D_PLUGINMGR.
|
noexcept |
Return the list of file filters; this will contain at least the default "All Files (*.*)|*.*" and the file filters supported by any available plugins.
Definition at line 426 of file 3d_plugin_manager.cpp.
References m_FileFilters.
|
private |
list potential plugins
Definition at line 259 of file 3d_plugin_manager.cpp.
References checkPluginName().
Referenced by loadPlugins().
| SCENEGRAPH * S3D_PLUGIN_MANAGER::Load3DModel | ( | const wxString & | aFileName, |
| std::string & | aPluginInfo ) |
Definition at line 432 of file 3d_plugin_manager.cpp.
References m_ExtMap.
|
private |
load plugins
Definition at line 117 of file 3d_plugin_manager.cpp.
References addExtensionMap(), addFilterString(), checkPluginPath(), KICAD_PLUGIN_LDR_3D::Close(), KICAD_PLUGIN_LDR_3D::GetFileFilter(), KICAD_PLUGIN_LDR_3D::GetNFilters(), PATHS::GetStockPlugins3DPath(), listPlugins(), m_Plugins, MASK_3D_PLUGINMGR, and KICAD_PLUGIN_LDR_3D::Open().
Referenced by S3D_PLUGIN_MANAGER().
|
private |
mapping of extensions to available plugins
Definition at line 91 of file 3d_plugin_manager.h.
Referenced by addExtensionMap(), Load3DModel(), and S3D_PLUGIN_MANAGER().
|
private |
list of file filters
Definition at line 94 of file 3d_plugin_manager.h.
Referenced by addFilterString(), GetFileFilters(), and S3D_PLUGIN_MANAGER().
|
private |
list of discovered plugins
Definition at line 88 of file 3d_plugin_manager.h.
Referenced by CheckTag(), ClosePlugins(), loadPlugins(), and ~S3D_PLUGIN_MANAGER().