KiCad PCB EDA Suite
pcb_component.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 (C) 2007, 2008 Lubo Racko <[email protected]>
5 * Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <[email protected]>
6 * Copyright (C) 2012 KiCad Developers, see AUTHORS.TXT for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <pcad/pcb_component.h>
27
28#include <board.h>
29#include <common.h>
30#include <footprint.h>
31
32#include <wx/string.h>
33
34
35namespace PCAD2KICAD {
36
38 m_uuid(),
39 m_callbacks( aCallbacks ),
40 m_board( aBoard )
41{
42 m_tag = 0;
43 m_objType = wxT( '?' );
44 m_PCadLayer = 0;
45 m_KiCadLayer = F_Cu; // It *has* to be somewhere...
46 m_positionX = 0;
47 m_positionY = 0;
50 m_net = wxEmptyString;
51 m_netCode = 0;
52 m_compRef = wxEmptyString;
53 m_patGraphRefName = wxEmptyString;
54}
55
56
58{
59}
60
61
63{
64}
65
66
67void PCB_COMPONENT::SetPosOffset( int aX_offs, int aY_offs )
68{
69 m_positionX += aX_offs;
70 m_positionY += aY_offs;
71}
72
74{
76}
77
78} // namespace PCAD2KICAD
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
virtual void AddToFootprint(FOOTPRINT *aFootprint)
virtual void SetPosOffset(int aX_offs, int aY_offs)
PCB_COMPONENT(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
The common library.
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:412
@ F_Cu
Definition: layer_ids.h:64
void InitTTextValue(TTEXTVALUE *aTextValue)