LibrePCB Developers Documentation
bomcsvwriter.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_CORE_BOMCSVWRITER_H
21#define LIBREPCB_CORE_BOMCSVWRITER_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include <QtCore>
27
28#include <memory>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class Bom;
36class CsvFile;
37
38/*******************************************************************************
39 * Class BomCsvWriter
40 ******************************************************************************/
41
45class BomCsvWriter final {
46 Q_DECLARE_TR_FUNCTIONS(BomCsvWriter)
47
48public:
49 // Constructors / Destructor
50 BomCsvWriter() = delete;
51 BomCsvWriter(const BomCsvWriter& other) = delete;
52 explicit BomCsvWriter(const Bom& bom) noexcept;
53 ~BomCsvWriter() noexcept;
54
55 // General Methods
56 void setIncludeNonMountedParts(bool include) noexcept;
57 std::shared_ptr<CsvFile> generateCsv() const;
58
59 // Operator Overloadings
60 BomCsvWriter& operator=(const BomCsvWriter& rhs) = delete;
61
62private:
63 const Bom& mBom;
65};
66
67/*******************************************************************************
68 * End of File
69 ******************************************************************************/
70
71} // namespace librepcb
72
73#endif
The BomCsvWriter class.
Definition: bomcsvwriter.h:45
void setIncludeNonMountedParts(bool include) noexcept
Definition: bomcsvwriter.cpp:50
BomCsvWriter(const BomCsvWriter &other)=delete
~BomCsvWriter() noexcept
Definition: bomcsvwriter.cpp:43
bool mIncludeNonMountedParts
Definition: bomcsvwriter.h:64
std::shared_ptr< CsvFile > generateCsv() const
Definition: bomcsvwriter.cpp:54
const Bom & mBom
Definition: bomcsvwriter.h:63
The Bom class represents a bill of materials list.
Definition: bom.h:84
The CsvFile class represents a comma-separated values (CSV) file.
Definition: csvfile.h:58
Definition: occmodel.cpp:77