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, const wxString &aDefaultMeasurementUnit, const wxString &aActualConversion) override
 
void AddToBoard () override
 
virtual void SetPosOffset (int aX_offs, int aY_offs)
 
virtual void Flip ()
 
virtual void AddToModule (MODULE *aModule)
 
PCB_LAYER_ID GetKiCadLayer ()
 
int GetNetCode (wxString aNetName)
 

Public Attributes

wxString m_shape
 
int m_width
 
int m_height
 
int m_tag
 
char m_objType
 
int m_PCadLayer
 
PCB_LAYER_ID m_KiCadLayer
 
KIID m_uuid
 
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

◆ PCB_VIA_SHAPE()

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

Definition at line 37 of file pcb_via_shape.cpp.

38  : PCB_PAD_SHAPE( aCallbacks, aBoard )
39 {
40 }
PCB_PAD_SHAPE(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)

◆ ~PCB_VIA_SHAPE()

PCAD2KICAD::PCB_VIA_SHAPE::~PCB_VIA_SHAPE ( )

Definition at line 43 of file pcb_via_shape.cpp.

44 {
45 }

Member Function Documentation

◆ AddToBoard()

void PCAD2KICAD::PCB_PAD_SHAPE::AddToBoard ( )
overridevirtualinherited

Implements PCAD2KICAD::PCB_COMPONENT.

Definition at line 137 of file pcb_pad_shape.cpp.

138 {
139 }

◆ AddToModule()

void PCAD2KICAD::PCB_COMPONENT::AddToModule ( MODULE aModule)
virtualinherited

◆ Flip()

◆ GetKiCadLayer()

◆ GetNetCode()

◆ Parse()

void PCAD2KICAD::PCB_VIA_SHAPE::Parse ( XNODE aNode,
const wxString &  aDefaultMeasurementUnit,
const wxString &  aActualConversion 
)
overridevirtual

Reimplemented from PCAD2KICAD::PCB_PAD_SHAPE.

Definition at line 48 of file pcb_via_shape.cpp.

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

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().

◆ SetPosOffset()

void PCAD2KICAD::PCB_COMPONENT::SetPosOffset ( int  aX_offs,
int  aY_offs 
)
virtualinherited

Member Data Documentation

◆ m_board

◆ m_callbacks

◆ m_compRef

wxString PCAD2KICAD::PCB_COMPONENT::m_compRef
inherited

◆ m_height

◆ m_KiCadLayer

◆ m_name

◆ m_net

◆ m_netCode

◆ m_objType

◆ m_patGraphRefName

wxString PCAD2KICAD::PCB_COMPONENT::m_patGraphRefName
inherited

◆ m_PCadLayer

◆ m_positionX

◆ m_positionY

◆ m_rotation

◆ m_shape

wxString PCAD2KICAD::PCB_PAD_SHAPE::m_shape
inherited

◆ m_tag

int PCAD2KICAD::PCB_COMPONENT::m_tag
inherited

Definition at line 51 of file pcb_component.h.

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

◆ m_uuid

KIID PCAD2KICAD::PCB_COMPONENT::m_uuid
inherited

Definition at line 55 of file pcb_component.h.

◆ m_width


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