LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
devicesetconverter.h
Go to the documentation of this file.
1 /*
2  * LibrePCB - Professional EDA for everyone!
3  * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4  * https://librepcb.org/
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef LIBREPCB_EAGLEIMPORT_DEVICESETCONVERTER_H
21 #define LIBREPCB_EAGLEIMPORT_DEVICESETCONVERTER_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include <QtCore>
27 
28 #include <memory>
29 
30 /*******************************************************************************
31  * Namespace / Forward Declarations
32  ******************************************************************************/
33 
34 namespace parseagle {
35 class DeviceSet;
36 }
37 
38 namespace librepcb {
39 
40 namespace library {
41 class Component;
42 }
43 
44 namespace eagleimport {
45 
46 class ConverterDb;
47 
48 /*******************************************************************************
49  * Class DeviceSetConverter
50  ******************************************************************************/
51 
55 class DeviceSetConverter final {
56 public:
57  // Constructors / Destructor
58  DeviceSetConverter() = delete;
59  DeviceSetConverter(const DeviceSetConverter& other) = delete;
60  DeviceSetConverter(const parseagle::DeviceSet& deviceSet,
61  ConverterDb& db) noexcept;
62  ~DeviceSetConverter() noexcept;
63 
64  // General Methods
65  std::unique_ptr<library::Component> generate() const;
66 
67  // Operator Overloadings
68  DeviceSetConverter& operator=(const DeviceSetConverter& rhs) = delete;
69 
70 private:
71  QString createDescription() const noexcept;
72 
73  const parseagle::DeviceSet& mDeviceSet;
75 };
76 
77 /*******************************************************************************
78  * End of File
79  ******************************************************************************/
80 
81 } // namespace eagleimport
82 } // namespace librepcb
83 
84 #endif // LIBREPCB_EAGLEIMPORT_DEVICESETCONVERTER_H
~DeviceSetConverter() noexcept
Definition: devicesetconverter.cpp:47
std::unique_ptr< library::Component > generate() const
Definition: devicesetconverter.cpp:54
The ConverterDb class.
Definition: converterdb.h:47
QString createDescription() const noexcept
Definition: devicesetconverter.cpp:134
ConverterDb & mDb
Definition: devicesetconverter.h:74
DeviceSetConverter & operator=(const DeviceSetConverter &rhs)=delete
The DeviceSetConverter class.
Definition: devicesetconverter.h:55
const parseagle::DeviceSet & mDeviceSet
Definition: devicesetconverter.h:73