KiCad PCB EDA Suite
PCAD2KICAD::PCB_VIA_SHAPE Class Reference

#include <pcb_via_shape.h>

Inheritance diagram for PCAD2KICAD::PCB_VIA_SHAPE:
PCAD2KICAD::PCB_PAD_SHAPE PCAD2KICAD::PCB_COMPONENT

Public Member Functions

 PCB_VIA_SHAPE (PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
 
 ~PCB_VIA_SHAPE ()
 
virtual void Parse (XNODE *aNode, wxString aDefaultMeasurementUnit, wxString aActualConversion) override
 
void AddToBoard () override
 
virtual void SetPosOffset (int aX_offs, int aY_offs)
 
virtual void Flip ()
 
virtual void AddToModule (MODULE *aModule)
 
LAYER_ID GetKiCadLayer ()
 
int GetNewTimestamp ()
 
int GetNetCode (wxString aNetName)
 

Public Attributes

wxString m_shape
 
int m_width
 
int m_height
 
int m_tag
 
char m_objType
 
int m_PCadLayer
 
LAYER_ID m_KiCadLayer
 
int m_timestamp
 
int m_positionX
 
int m_positionY
 
int m_rotation
 
TTEXTVALUE m_name
 
wxString m_net
 
int m_netCode
 
wxString m_compRef
 
wxString m_patGraphRefName
 

Protected Attributes

PCB_CALLBACKSm_callbacks
 
BOARDm_board
 

Detailed Description

Definition at line 39 of file pcb_via_shape.h.

Constructor & Destructor Documentation

PCAD2KICAD::PCB_VIA_SHAPE::PCB_VIA_SHAPE ( PCB_CALLBACKS aCallbacks,
BOARD aBoard 
)

Definition at line 39 of file pcb_via_shape.cpp.

40  : PCB_PAD_SHAPE( aCallbacks, aBoard )
41 {
42 }
PCB_PAD_SHAPE(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
PCAD2KICAD::PCB_VIA_SHAPE::~PCB_VIA_SHAPE ( )

Definition at line 45 of file pcb_via_shape.cpp.

46 {
47 }

Member Function Documentation

void PCAD2KICAD::PCB_PAD_SHAPE::AddToBoard ( )
overridevirtualinherited

Implements PCAD2KICAD::PCB_COMPONENT.

Definition at line 138 of file pcb_pad_shape.cpp.

139 {
140 }
void PCAD2KICAD::PCB_COMPONENT::AddToModule ( MODULE aModule)
virtualinherited
void PCAD2KICAD::PCB_COMPONENT::Flip ( )
virtualinherited
int PCAD2KICAD::PCB_COMPONENT::GetNewTimestamp ( )
inlineinherited
void PCAD2KICAD::PCB_VIA_SHAPE::Parse ( XNODE aNode,
wxString  aDefaultMeasurementUnit,
wxString  aActualConversion 
)
overridevirtual

Reimplemented from PCAD2KICAD::PCB_PAD_SHAPE.

Definition at line 50 of file pcb_via_shape.cpp.

References PCAD2KICAD::FindNode(), PCAD2KICAD::PCB_COMPONENT::GetKiCadLayer(), PCAD2KICAD::PCB_PAD_SHAPE::m_height, PCAD2KICAD::PCB_COMPONENT::m_KiCadLayer, PCAD2KICAD::PCB_COMPONENT::m_PCadLayer, PCAD2KICAD::PCB_PAD_SHAPE::m_shape, PCAD2KICAD::PCB_PAD_SHAPE::m_width, and PCAD2KICAD::SetWidth().

Referenced by PCAD2KICAD::PCB_VIA::Parse().

53 {
54  XNODE* lNode;
55  wxString str;
56  long num;
57 
58  lNode = FindNode( aNode, wxT( "viaShapeType" ) );
59 
60  if( lNode )
61  {
62  str = lNode->GetNodeContent();
63  str.Trim( false );
64  m_shape = str;
65  }
66 
67  lNode = FindNode( aNode, wxT( "layerNumRef" ) );
68 
69  if( lNode )
70  {
71  lNode->GetNodeContent().ToLong( &num );
72  m_PCadLayer = (int) num;
73  }
74 
76  lNode = FindNode( aNode, wxT( "shapeWidth" ) );
77 
78  if( lNode )
79  SetWidth( lNode->GetNodeContent(), aDefaultMeasurementUnit, &m_width, aActualConversion );
80 
81  lNode = FindNode( aNode, wxT( "shapeHeight" ) );
82 
83  if( lNode )
84  SetWidth( lNode->GetNodeContent(), aDefaultMeasurementUnit, &m_height, aActualConversion );
85 
86 }
void SetWidth(wxString aStr, wxString aDefaultMeasurementUnit, int *aWidth, wxString aActualConversion)
Class XNODE holds an XML or S-expression element.
Definition: xnode.h:43
XNODE * FindNode(XNODE *aChild, wxString aTag)
void PCAD2KICAD::PCB_COMPONENT::SetPosOffset ( int  aX_offs,
int  aY_offs 
)
virtualinherited

Member Data Documentation

wxString PCAD2KICAD::PCB_COMPONENT::m_compRef
inherited
wxString PCAD2KICAD::PCB_COMPONENT::m_patGraphRefName
inherited
wxString PCAD2KICAD::PCB_PAD_SHAPE::m_shape
inherited
int PCAD2KICAD::PCB_COMPONENT::m_tag
inherited

Definition at line 51 of file pcb_component.h.

Referenced by PCAD2KICAD::PCB_COMPONENT::PCB_COMPONENT().


The documentation for this class was generated from the following files: