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 (C) 2020 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, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
30#ifndef PLUGIN_MANAGER_3D_H
31#define PLUGIN_MANAGER_3D_H
32
33#include <map>
34#include <list>
35#include <string>
36#include <wx/string.h>
37
38class wxWindow;
40class SCENEGRAPH;
41
43{
44public:
46 virtual ~S3D_PLUGIN_MANAGER();
47
54 std::list< wxString > const* GetFileFilters( void ) const noexcept;
55
56 SCENEGRAPH* Load3DModel( const wxString& aFileName, std::string& aPluginInfo );
57
64 void ClosePlugins( void );
65
70 bool CheckTag( const char* aTag );
71
72private:
74 void loadPlugins( void );
75
77 void listPlugins( const wxString& aPath, std::list< wxString >& aPluginList );
78
80 void checkPluginName( const wxString& aPath, std::list< wxString >& aPluginList );
81
83 void checkPluginPath( const wxString& aPath, std::list< wxString >& aSearchList );
84
86 void addFilterString( const wxString& aFilterString );
87
89 void addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin );
90
92 std::list< KICAD_PLUGIN_LDR_3D* > m_Plugins;
93
95 std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* > m_ExtMap;
96
98 std::list< wxString > m_FileFilters;
99};
100
101#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:45