KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
component_class_cache_proxy.cpp
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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
22
23#include <board.h>
24#include <footprint.h>
25
27{
29
30 if( mgr.GetTicker() > m_lastTickerValue )
31 {
33 }
34
36}
37
38
40{
41 if( !manager )
43
47 m_lastTickerValue = manager->GetTicker();
48}
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
Definition: board_item.cpp:48
COMPONENT_CLASS_MANAGER & GetComponentClassManager()
Gets the component class manager.
Definition: board.h:1316
const COMPONENT_CLASS * m_staticComponentClass
void RecomputeComponentClass(COMPONENT_CLASS_MANAGER *manager=nullptr) const
Forces recomputation of the component class.
const COMPONENT_CLASS * GetComponentClass() const
Gets the full component class (static + dynamic resultant component class)
const COMPONENT_CLASS * m_finalComponentClass
const COMPONENT_CLASS * m_dynamicComponentClass
A class to manage Component Classes in a board context.
long long int GetTicker() const
Gets the component class validity ticker Used to check validity of cached component classes.
const COMPONENT_CLASS * GetCombinedComponentClass(const COMPONENT_CLASS *staticClass, const COMPONENT_CLASS *dynamicClass)
Gets the combined component class with the given static and dynamic constituent component classes.
const COMPONENT_CLASS * GetDynamicComponentClassesForFootprint(const FOOTPRINT *footprint)
Gets the dynamic component classes which match the given footprint.
A lightweight representation of a component class.