KiCad PCB EDA Suite
Loading...
Searching...
No Matches
3d_plugin_manager.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2016 Cirilo Bernardo <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
25
26#ifndef PLUGIN_MANAGER_3D_H
27#define PLUGIN_MANAGER_3D_H
28
29#include <map>
30#include <list>
31#include <string>
32#include <wx/string.h>
33
34class wxWindow;
36class SCENEGRAPH;
37
39{
40public:
42 virtual ~S3D_PLUGIN_MANAGER();
43
50 std::list< wxString > const* GetFileFilters( void ) const noexcept;
51
52 SCENEGRAPH* Load3DModel( const wxString& aFileName, std::string& aPluginInfo );
53
60 void ClosePlugins( void );
61
66 bool CheckTag( const char* aTag );
67
68private:
70 void loadPlugins( void );
71
73 void listPlugins( const wxString& aPath, std::list< wxString >& aPluginList );
74
76 void checkPluginName( const wxString& aPath, std::list< wxString >& aPluginList );
77
79 void checkPluginPath( const wxString& aPath, std::list< wxString >& aSearchList );
80
82 void addFilterString( const wxString& aFilterString );
83
85 void addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin );
86
88 std::list< KICAD_PLUGIN_LDR_3D* > m_Plugins;
89
91 std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* > m_ExtMap;
92
94 std::list< wxString > m_FileFilters;
95};
96
97#endif // PLUGIN_MANAGER_3D_H
void addFilterString(const wxString &aFilterString)
add an entry to the file filter list
std::list< wxString > m_FileFilters
list of file filters
std::list< KICAD_PLUGIN_LDR_3D * > m_Plugins
list of discovered plugins
void ClosePlugins(void)
Iterate through all discovered plugins and closes them to reclaim memory.
void loadPlugins(void)
load plugins
SCENEGRAPH * Load3DModel(const wxString &aFileName, std::string &aPluginInfo)
void checkPluginPath(const wxString &aPath, std::list< wxString > &aSearchList)
check the existence of a path and add it to the path search list
void listPlugins(const wxString &aPath, std::list< wxString > &aPluginList)
list potential plugins
std::list< wxString > const * GetFileFilters(void) const noexcept
Return the list of file filters; this will contain at least the default "All Files (*....
void checkPluginName(const wxString &aPath, std::list< wxString > &aPluginList)
check the existence of a plugin name and add it to the list
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D * > m_ExtMap
mapping of extensions to available plugins
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 lo...
void addExtensionMap(KICAD_PLUGIN_LDR_3D *aPlugin)
add entries to the extension map
Define the basic data set required to represent a 3D model.
Definition scenegraph.h:41