KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_stackup_table.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (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 <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef PCB_STACKUP_TABLE_H
21#define PCB_STACKUP_TABLE_H
22
24#include <pcb_generated_table.h>
25
26
34{
35public:
36 explicit PCB_STACKUP_TABLE( BOARD_ITEM* aParent );
37
38 static inline bool ClassOf( const EDA_ITEM* aItem )
39 {
40 return aItem && PCB_STACKUP_TABLE_T == aItem->Type();
41 }
42
43 wxString GetClass() const override { return wxT( "PCB_STACKUP_TABLE" ); }
44
45 EDA_ITEM* Clone() const override { return new PCB_STACKUP_TABLE( *this ); }
46
47 const GENERATED_TABLE_SCHEMA& Schema() const override { return StackupTableSchema(); }
48
49 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
50
51 bool operator==( const BOARD_ITEM& aOther ) const override;
52
53 void Serialize( google::protobuf::Any& aContainer ) const override;
54 bool Deserialize( const google::protobuf::Any& aContainer ) override;
55
56protected:
57 std::unique_ptr<GENERATED_TABLE_CONTENT> generate( const BOARD& aBoard,
58 GENERATED_TABLE_REFRESH* aRefresh ) const override;
59
63 void styleNewCell( PCB_TABLECELL* aCell, bool aIsHeading ) override;
64};
65
66#endif // PCB_STACKUP_TABLE_H
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:99
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
One pass of rebuilding tables.
The columns one generator (the drill chart, a stackup table, ...) can produce, and the units and prec...
PCB_GENERATED_TABLE(BOARD_ITEM *aParent, KICAD_T aType, int aLineWidth)
wxString GetClass() const override
Return the class name.
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
PCB_STACKUP_TABLE(BOARD_ITEM *aParent)
bool operator==(const BOARD_ITEM &aOther) const override
void styleNewCell(PCB_TABLECELL *aCell, bool aIsHeading) override
The text style of the one-shot stackup table this replaces, so a placed table looks the same.
const GENERATED_TABLE_SCHEMA & Schema() const override
static bool ClassOf(const EDA_ITEM *aItem)
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
std::unique_ptr< GENERATED_TABLE_CONTENT > generate(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh) const override
The rows this table reports.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const GENERATED_TABLE_SCHEMA & StackupTableSchema()
Every column a stackup table can show, all of them by default.
@ PCB_STACKUP_TABLE_T
class PCB_STACKUP_TABLE, a live stackup table derived from PCB_TABLE
Definition typeinfo.h:242