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
47
48
50{
51 std::string id;
52 std::string name;
53 std::string symbolIdStr;
54
55 bool exclude_from_bom = false;
56 bool exclude_from_board = false;
57 bool exclude_from_sim = false;
58
59 std::time_t lastCached = 0;
60
61 bool detailsLoaded = false;
62
63 std::string desc;
64 std::string keywords;
65 std::vector<std::string> fp_filters;
66
68 using field_type = std::tuple<std::string, bool>;
69
70 std::vector<std::pair<std::string, field_type>> fields;
71
73 std::unordered_map<wxString, std::vector<wxString>> pin_map;
74
77 std::vector<ASSOCIATED_FOOTPRINT> associated_footprints;
78};
79
80
82{
83 std::string id;
84 std::string name;
85 std::string description;
86
87 std::time_t lastCached = 0;
88
89 std::vector<HTTP_LIB_PART> cachedParts;
90};
91
92
94{
95public:
96 HTTP_LIB_SETTINGS( const std::string& aFilename );
97 ~HTTP_LIB_SETTINGS() override = default;
98
106
107 std::string getSupportedAPIVersion() { return m_api_version; }
108
109protected:
110 wxString getFileExt() const override;
111
112public:
114
115private:
116 std::string m_sourceType;
117 std::string m_api_version = "v1";
118};
119
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:123
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).
HTTP_LIB_SOURCE_TYPE type
std::string api_version