KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CVPCB_ASSOCIATION Class Reference

A class to define a footprint association to be made in cvpcb. More...

#include <cvpcb_association.h>

Public Member Functions

 CVPCB_ASSOCIATION (unsigned int aComponentIndex, LIB_ID aNewFootprint, LIB_ID aOldFootprint=LIB_ID())
 Create an association event that contains all the information needed to modify the footprint association of a component in cvpcb.
 
 CVPCB_ASSOCIATION (unsigned int aComponentIndex, wxString aNewFootprint, wxString aOldFootprint="")
 
CVPCB_ASSOCIATION Reverse () const
 Reverse the association.
 
unsigned int GetComponentIndex () const
 Get the index of the component to modify the association of.
 
LIB_ID GetNewFootprint () const
 Get the new footprint to associate to the component.
 
LIB_ID GetOldFootprint () const
 Get the old footprint of the component.
 
void SetNewFootprint (const LIB_ID &aNewFootprint)
 Set the footprint that should be associated with the component.
 
void SetOldFootprint (const LIB_ID &aOldFootprint)
 Set the footprint that was associated with the component before this association event.
 

Private Attributes

unsigned int m_componentIndex
 
LIB_ID m_newFootprint
 
LIB_ID m_oldFootprint
 

Detailed Description

A class to define a footprint association to be made in cvpcb.

Definition at line 30 of file cvpcb_association.h.

Constructor & Destructor Documentation

◆ CVPCB_ASSOCIATION() [1/2]

CVPCB_ASSOCIATION::CVPCB_ASSOCIATION ( unsigned int  aComponentIndex,
LIB_ID  aNewFootprint,
LIB_ID  aOldFootprint = LIB_ID() 
)
inline

Create an association event that contains all the information needed to modify the footprint association of a component in cvpcb.

Parameters
aComponentIndexis the index of the component to change
aNewFootprintis the new footprint to give to the component
aOldFootprintis the old footprint from the component

Definition at line 43 of file cvpcb_association.h.

◆ CVPCB_ASSOCIATION() [2/2]

CVPCB_ASSOCIATION::CVPCB_ASSOCIATION ( unsigned int  aComponentIndex,
wxString  aNewFootprint,
wxString  aOldFootprint = "" 
)
inline

Definition at line 50 of file cvpcb_association.h.

References m_newFootprint, m_oldFootprint, and LIB_ID::Parse().

Member Function Documentation

◆ GetComponentIndex()

unsigned int CVPCB_ASSOCIATION::GetComponentIndex ( ) const
inline

Get the index of the component to modify the association of.

Returns
the index of the component

Definition at line 73 of file cvpcb_association.h.

References m_componentIndex.

Referenced by CVPCB_MAINFRAME::AssociateFootprint().

◆ GetNewFootprint()

LIB_ID CVPCB_ASSOCIATION::GetNewFootprint ( ) const
inline

Get the new footprint to associate to the component.

Returns
the LIB_ID of the new footprint

Definition at line 83 of file cvpcb_association.h.

References m_newFootprint.

Referenced by CVPCB_MAINFRAME::AssociateFootprint().

◆ GetOldFootprint()

LIB_ID CVPCB_ASSOCIATION::GetOldFootprint ( ) const
inline

Get the old footprint of the component.

Returns
the LIB_ID of the old footprint

Definition at line 93 of file cvpcb_association.h.

References m_oldFootprint.

◆ Reverse()

CVPCB_ASSOCIATION CVPCB_ASSOCIATION::Reverse ( ) const
inline

Reverse the association.

Returns
the reversed association

Definition at line 63 of file cvpcb_association.h.

References m_componentIndex, m_newFootprint, and m_oldFootprint.

◆ SetNewFootprint()

void CVPCB_ASSOCIATION::SetNewFootprint ( const LIB_ID aNewFootprint)
inline

Set the footprint that should be associated with the component.

Parameters
aNewFootprintis the LIB_ID of the new footprint

Definition at line 103 of file cvpcb_association.h.

References m_newFootprint.

◆ SetOldFootprint()

void CVPCB_ASSOCIATION::SetOldFootprint ( const LIB_ID aOldFootprint)
inline

Set the footprint that was associated with the component before this association event.

Parameters
aOldFootprintis the LIB_ID of the old footprint

Definition at line 113 of file cvpcb_association.h.

References m_oldFootprint.

Member Data Documentation

◆ m_componentIndex

unsigned int CVPCB_ASSOCIATION::m_componentIndex
private

Definition at line 120 of file cvpcb_association.h.

Referenced by GetComponentIndex(), and Reverse().

◆ m_newFootprint

LIB_ID CVPCB_ASSOCIATION::m_newFootprint
private

Definition at line 121 of file cvpcb_association.h.

Referenced by CVPCB_ASSOCIATION(), GetNewFootprint(), Reverse(), and SetNewFootprint().

◆ m_oldFootprint

LIB_ID CVPCB_ASSOCIATION::m_oldFootprint
private

Definition at line 122 of file cvpcb_association.h.

Referenced by CVPCB_ASSOCIATION(), GetOldFootprint(), Reverse(), and SetOldFootprint().


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