Horizon
bom_export_settings.hpp
1 #pragma once
2 #include "common/lut.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "bom.hpp"
5 #include <vector>
6 
7 namespace horizon {
8 using json = nlohmann::json;
9 
11 public:
12  BOMExportSettings(const json &);
14  json serialize() const;
15 
16  enum class Format { CSV };
17  Format format = Format::CSV;
18 
19  class CSVSettings {
20  public:
21  CSVSettings(const json &j);
22  CSVSettings();
23 
24  std::vector<BOMColumn> columns;
25  BOMColumn sort_column = BOMColumn::REFDES;
26  enum class Order { ASC, DESC };
27  Order order = Order::ASC;
28 
29  json serialize() const;
30  };
31 
32  CSVSettings csv_settings;
33 
34  std::string output_filename;
35 };
36 } // namespace horizon
a class to store JSON values
Definition: json.hpp:161
Definition: bom_export_settings.hpp:19
Definition: bom_export_settings.hpp:10
Definition: part_wizard.hpp:10
Definition: block.cpp:9
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61