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

#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.
 
SCENEGRAPHLoad3DModel (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
 

Detailed Description

Definition at line 42 of file 3d_plugin_manager.h.

Constructor & Destructor Documentation

◆ S3D_PLUGIN_MANAGER()

S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER ( )

Definition at line 55 of file 3d_plugin_manager.cpp.

References _, loadPlugins(), m_ExtMap, m_FileFilters, and MASK_3D_PLUGINMGR.

◆ ~S3D_PLUGIN_MANAGER()

S3D_PLUGIN_MANAGER::~S3D_PLUGIN_MANAGER ( )
virtual

Definition at line 105 of file 3d_plugin_manager.cpp.

References m_Plugins.

Member Function Documentation

◆ addExtensionMap()

void S3D_PLUGIN_MANAGER::addExtensionMap ( KICAD_PLUGIN_LDR_3D aPlugin)
private

add entries to the extension map

Definition at line 402 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().

◆ addFilterString()

void S3D_PLUGIN_MANAGER::addFilterString ( const wxString &  aFilterString)
private

add an entry to the file filter list

Definition at line 380 of file 3d_plugin_manager.cpp.

References m_FileFilters.

Referenced by loadPlugins().

◆ checkPluginName()

void S3D_PLUGIN_MANAGER::checkPluginName ( const wxString &  aPath,
std::list< wxString > &  aPluginList 
)
private

check the existence of a plugin name and add it to the list

Definition at line 306 of file 3d_plugin_manager.cpp.

References ExpandEnvVarSubstitutions(), FN_NORMALIZE_FLAGS, MASK_3D_PLUGINMGR, and path.

Referenced by listPlugins().

◆ checkPluginPath()

void S3D_PLUGIN_MANAGER::checkPluginPath ( const wxString &  aPath,
std::list< wxString > &  aSearchList 
)
private

check the existence of a path and add it to the path search list

Definition at line 347 of file 3d_plugin_manager.cpp.

References FN_NORMALIZE_FLAGS, MASK_3D_PLUGINMGR, and path.

Referenced by loadPlugins().

◆ CheckTag()

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 496 of file 3d_plugin_manager.cpp.

References m_Plugins.

Referenced by checkTag().

◆ ClosePlugins()

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 480 of file 3d_plugin_manager.cpp.

References m_Plugins, and MASK_3D_PLUGINMGR.

Referenced by S3D_CACHE::ClosePlugins().

◆ GetFileFilters()

std::list< wxString > const * S3D_PLUGIN_MANAGER::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.

Returns
a pointer to the internal filter list.

Definition at line 430 of file 3d_plugin_manager.cpp.

Referenced by S3D_CACHE::GetFileFilters().

◆ listPlugins()

void S3D_PLUGIN_MANAGER::listPlugins ( const wxString &  aPath,
std::list< wxString > &  aPluginList 
)
private

list potential plugins

Definition at line 263 of file 3d_plugin_manager.cpp.

References checkPluginName().

Referenced by loadPlugins().

◆ Load3DModel()

SCENEGRAPH * S3D_PLUGIN_MANAGER::Load3DModel ( const wxString &  aFileName,
std::string &  aPluginInfo 
)

Definition at line 436 of file 3d_plugin_manager.cpp.

References m_ExtMap.

Referenced by S3D_CACHE::checkCache(), and S3D_CACHE::load().

◆ loadPlugins()

Member Data Documentation

◆ m_ExtMap

std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* > S3D_PLUGIN_MANAGER::m_ExtMap
private

mapping of extensions to available plugins

Definition at line 95 of file 3d_plugin_manager.h.

Referenced by addExtensionMap(), Load3DModel(), and S3D_PLUGIN_MANAGER().

◆ m_FileFilters

std::list< wxString > S3D_PLUGIN_MANAGER::m_FileFilters
private

list of file filters

Definition at line 98 of file 3d_plugin_manager.h.

Referenced by addFilterString(), and S3D_PLUGIN_MANAGER().

◆ m_Plugins

std::list< KICAD_PLUGIN_LDR_3D* > S3D_PLUGIN_MANAGER::m_Plugins
private

list of discovered plugins

Definition at line 92 of file 3d_plugin_manager.h.

Referenced by CheckTag(), ClosePlugins(), loadPlugins(), and ~S3D_PLUGIN_MANAGER().


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