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 <developer@lura.sk>
5
* Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <al.lunev@yahoo.com>
6
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.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
30
#include <wx/wx.h>
31
32
#include <
common.h
>
33
34
#include <
pcb_component.h
>
35
36
namespace
PCAD2KICAD
{
37
38
PCB_COMPONENT::PCB_COMPONENT
(
PCB_CALLBACKS
* aCallbacks,
39
BOARD
* aBoard ) :
40
m_uuid(),
41
m_callbacks( aCallbacks ),
42
m_board( aBoard )
43
{
44
m_tag
= 0;
45
m_objType
= wxT(
'?'
);
46
m_PCadLayer
= 0;
47
m_KiCadLayer
=
F_Cu
;
// It *has* to be somewhere...
48
m_positionX
= 0;
49
m_positionY
= 0;
50
m_rotation
= 0;
51
InitTTextValue
( &
m_name
);
52
m_net
= wxEmptyString;
53
m_netCode
= 0;
54
m_compRef
= wxEmptyString;
55
m_patGraphRefName
= wxEmptyString;
56
}
57
58
59
PCB_COMPONENT::~PCB_COMPONENT
()
60
{
61
}
62
63
64
void
PCB_COMPONENT::AddToFootprint
(
FOOTPRINT
* aFootprint )
65
{
66
}
67
68
69
void
PCB_COMPONENT::SetPosOffset
(
int
aX_offs,
int
aY_offs )
70
{
71
m_positionX
+= aX_offs;
72
m_positionY
+= aY_offs;
73
}
74
75
void
PCB_COMPONENT::Flip
()
76
{
77
m_positionX
= -
m_positionX
;
78
}
79
80
}
// namespace PCAD2KICAD
PCAD2KICAD::PCB_COMPONENT::AddToFootprint
virtual void AddToFootprint(FOOTPRINT *aFootprint)
Definition:
pcb_component.cpp:64
PCAD2KICAD::PCB_CALLBACKS
Definition:
pcb_callbacks.h:53
PCAD2KICAD::PCB_COMPONENT::m_compRef
wxString m_compRef
Definition:
pcb_component.h:59
PCAD2KICAD::PCB_COMPONENT::Flip
virtual void Flip()
Definition:
pcb_component.cpp:75
PCAD2KICAD::PCB_COMPONENT::m_positionX
int m_positionX
Definition:
pcb_component.h:53
PCAD2KICAD::PCB_COMPONENT::m_name
TTEXTVALUE m_name
Definition:
pcb_component.h:56
PCAD2KICAD::PCB_COMPONENT::m_positionY
int m_positionY
Definition:
pcb_component.h:54
PCAD2KICAD::PCB_COMPONENT::SetPosOffset
virtual void SetPosOffset(int aX_offs, int aY_offs)
Definition:
pcb_component.cpp:69
PCAD2KICAD::PCB_COMPONENT::m_PCadLayer
int m_PCadLayer
Definition:
pcb_component.h:50
PCAD2KICAD::PCB_COMPONENT::m_tag
int m_tag
Definition:
pcb_component.h:48
PCAD2KICAD::PCB_COMPONENT::m_rotation
int m_rotation
Definition:
pcb_component.h:55
pcb_component.h
F_Cu
Definition:
layers_id_colors_and_visibility.h:75
PCAD2KICAD::PCB_COMPONENT::~PCB_COMPONENT
~PCB_COMPONENT()
Definition:
pcb_component.cpp:59
PCAD2KICAD::PCB_COMPONENT::m_netCode
int m_netCode
Definition:
pcb_component.h:58
PCAD2KICAD
Definition:
pcad2kicad_common.cpp:40
BOARD
Information pertinent to a Pcbnew printed circuit board.
Definition:
board.h:190
PCAD2KICAD::PCB_COMPONENT::m_KiCadLayer
PCB_LAYER_ID m_KiCadLayer
Definition:
pcb_component.h:51
PCAD2KICAD::InitTTextValue
void InitTTextValue(TTEXTVALUE *aTextValue)
Definition:
pcad2kicad_common.cpp:591
common.h
The common library.
PCAD2KICAD::PCB_COMPONENT::m_objType
char m_objType
Definition:
pcb_component.h:49
PCAD2KICAD::PCB_COMPONENT::m_net
wxString m_net
Definition:
pcb_component.h:57
PCAD2KICAD::PCB_COMPONENT::PCB_COMPONENT
PCB_COMPONENT(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
Definition:
pcb_component.cpp:38
FOOTPRINT
Definition:
footprint.h:107
PCAD2KICAD::PCB_COMPONENT::m_patGraphRefName
wxString m_patGraphRefName
Definition:
pcb_component.h:60
pcbnew
plugins
pcad
pcb_component.cpp
Generated on Thu Apr 22 2021 04:12:37 for KiCad PCB EDA Suite by
1.8.15