KiCad PCB EDA Suite
graphics_import_mgr.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 CERN
5  * @author Maciej Suminski <maciej.suminski@cern.ch>
6  * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #ifndef GRAPHICS_IMPORT_MGR_H
27 #define GRAPHICS_IMPORT_MGR_H
28 
29 #include <memory>
30 #include <vector>
31 
33 class wxString;
34 
39 {
40 public:
43  {
44  DXF,
46  };
47 
48  using TYPE_LIST = std::vector<GFX_FILE_T>;
49 
55  GRAPHICS_IMPORT_MGR( const TYPE_LIST& aBlacklist );
56 
59  {
60  return m_importableTypes;
61  }
62 
64  std::unique_ptr<GRAPHICS_IMPORT_PLUGIN> GetPluginByExt( const wxString& aExtension ) const;
65 
67  std::unique_ptr<GRAPHICS_IMPORT_PLUGIN> GetPlugin( GFX_FILE_T aType ) const;
68 
69 private:
71 };
72 
73 #endif /* GRAPHICS_IMPORT_MGR_H */
TYPE_LIST GetImportableFileTypes() const
Vector containing all GFX_FILE_T values that can be imported.
GFX_FILE_T
List of handled file types.
Interface for vector graphics import plugins.
std::unique_ptr< GRAPHICS_IMPORT_PLUGIN > GetPlugin(GFX_FILE_T aType) const
Returns a plugin instance for a specific file type.
Class to manage vector graphics importers.
std::vector< GFX_FILE_T > TYPE_LIST
std::unique_ptr< GRAPHICS_IMPORT_PLUGIN > GetPluginByExt(const wxString &aExtension) const
Returns a plugin that handles a specific file extension.
GRAPHICS_IMPORT_MGR(const TYPE_LIST &aBlacklist)
Construct an import plugin manager, with a specified list of filetypes that are not permitted (can be...