KiCad PCB EDA Suite
Loading...
Searching...
No Matches
http_lib_settings.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) 2023 Andre F. K. Iwers <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
24#include <pin_map.h>
25#include <unordered_map>
26#include <vector>
27#include <wx/string.h>
28#include <ctime>
29
30
36
37
55
56
58{
59 std::string id;
60 std::string name;
61 std::string symbolIdStr;
62
63 bool exclude_from_bom = false;
64 bool exclude_from_board = false;
65 bool exclude_from_sim = false;
66
67 std::time_t lastCached = 0;
68
69 bool detailsLoaded = false;
70
71 std::string desc;
72 std::string keywords;
73 std::vector<std::string> fp_filters;
74
76 using field_type = std::tuple<std::string, bool>;
77
78 std::vector<std::pair<std::string, field_type>> fields;
79
81 std::unordered_map<wxString, std::vector<wxString>> pin_map;
82
85 std::vector<ASSOCIATED_FOOTPRINT> associated_footprints;
86};
87
88
90{
91 std::string id;
92 std::string name;
93 std::string description;
94
95 std::time_t lastCached = 0;
96
97 std::vector<HTTP_LIB_PART> cachedParts;
98};
99
100
102{
103public:
104 HTTP_LIB_SETTINGS( const std::string& aFilename );
105 ~HTTP_LIB_SETTINGS() override = default;
106
114
115 std::string getSupportedAPIVersion() { return m_api_version; }
116
117protected:
118 wxString getFileExt() const override;
119
120public:
122
123private:
124 std::string m_sourceType;
125 std::string m_api_version = "v1";
126};
127
std::string getSupportedAPIVersion()
wxString getFileExt() const override
~HTTP_LIB_SETTINGS() override=default
HTTP_LIB_SOURCE m_Source
HTTP_LIB_SETTINGS(const std::string &aFilename)
HTTP_LIB_SOURCE_TYPE get_HTTP_LIB_SOURCE_TYPE()
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
A symbol-owned ordered set of named pin maps.
Definition pin_map.h:124
HTTP_LIB_SOURCE_TYPE
std::string id
id of category
std::vector< HTTP_LIB_PART > cachedParts
std::string name
name of category
std::string description
description of category
std::vector< ASSOCIATED_FOOTPRINT > associated_footprints
std::string symbolIdStr
std::unordered_map< wxString, std::vector< wxString > > pin_map
Legacy flat MR !2540 pin assignment table (read for one release; issue #2282).
std::string keywords
std::vector< std::string > fp_filters
std::tuple< std::string, bool > field_type
Field content keyed by name, holding the text value and its schematic visibility.
std::time_t lastCached
std::vector< std::pair< std::string, field_type > > fields
PIN_MAP_SET named_pin_maps
Spec-form named pin maps and their footprint associations (issue #2282).
Connection parameters for one HTTP library.
HTTP_LIB_SOURCE_TYPE type
std::string api_version