KiCad PCB EDA Suite
TEST_SCH_PIN_FIXTURE Class Reference

Public Member Functions

 TEST_SCH_PIN_FIXTURE ()
 
 ~TEST_SCH_PIN_FIXTURE ()
 

Public Attributes

LIB_SYMBOLm_parent_part
 
LIB_PINm_lib_pin
 
SCH_SYMBOLm_parent_symbol
 
SCH_PINm_sch_pin
 

Detailed Description

Definition at line 33 of file test_sch_pin.cpp.

Constructor & Destructor Documentation

◆ TEST_SCH_PIN_FIXTURE()

TEST_SCH_PIN_FIXTURE::TEST_SCH_PIN_FIXTURE ( )
inline

Definition at line 36 of file test_sch_pin.cpp.

37 {
38 m_parent_part = new LIB_SYMBOL( "parent_part", nullptr );
39
42
43 // give the pin some kind of data we can use to test
44 m_lib_pin->SetNumber( "42" );
45 m_lib_pin->SetName( "pinname" );
47 m_lib_pin->SetPosition( wxPoint( 1, -2 ) ); // local coord system is upside-down
48
51 &path, 0, 0, wxPoint( 1, 2 ) );
52 m_parent_symbol->SetRef( &path, "U2" );
54
56 }
void SetPosition(const VECTOR2I &aPos) override
Definition: lib_pin.h:225
void SetName(const wxString &aName)
Definition: lib_pin.h:115
void SetType(ELECTRICAL_PINTYPE aType)
Definition: lib_pin.h:92
void SetNumber(const wxString &aNumber)
Definition: lib_pin.h:125
Define a library symbol object.
Definition: lib_symbol.h:99
LIB_ID GetLibId() const override
Definition: lib_symbol.h:139
void AddDrawItem(LIB_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Definition: lib_symbol.cpp:713
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Schematic symbol object.
Definition: sch_symbol.h:79
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
Definition: sch_symbol.cpp:321
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
Definition: sch_symbol.cpp:529
std::vector< SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve a list of the SCH_PINs for the given sheet path.
Definition: sch_symbol.cpp:936
SCH_SYMBOL * m_parent_symbol
LIB_SYMBOL * m_parent_part
@ PT_INPUT
usual pin input: must be connected

References LIB_SYMBOL::AddDrawItem(), LIB_SYMBOL::GetLibId(), SCH_SYMBOL::GetPins(), m_lib_pin, m_parent_part, m_parent_symbol, m_sch_pin, path, PT_INPUT, LIB_PIN::SetName(), LIB_PIN::SetNumber(), LIB_PIN::SetPosition(), SCH_SYMBOL::SetRef(), LIB_PIN::SetType(), and SCH_SYMBOL::UpdatePins().

◆ ~TEST_SCH_PIN_FIXTURE()

TEST_SCH_PIN_FIXTURE::~TEST_SCH_PIN_FIXTURE ( )
inline

Definition at line 58 of file test_sch_pin.cpp.

59 {
60 delete m_parent_symbol;
61 delete m_parent_part;
62 }

References m_parent_part, and m_parent_symbol.

Member Data Documentation

◆ m_lib_pin

LIB_PIN* TEST_SCH_PIN_FIXTURE::m_lib_pin

Definition at line 65 of file test_sch_pin.cpp.

Referenced by TEST_SCH_PIN_FIXTURE().

◆ m_parent_part

LIB_SYMBOL* TEST_SCH_PIN_FIXTURE::m_parent_part

Definition at line 64 of file test_sch_pin.cpp.

Referenced by TEST_SCH_PIN_FIXTURE(), and ~TEST_SCH_PIN_FIXTURE().

◆ m_parent_symbol

SCH_SYMBOL* TEST_SCH_PIN_FIXTURE::m_parent_symbol

Definition at line 67 of file test_sch_pin.cpp.

Referenced by TEST_SCH_PIN_FIXTURE(), and ~TEST_SCH_PIN_FIXTURE().

◆ m_sch_pin

SCH_PIN* TEST_SCH_PIN_FIXTURE::m_sch_pin

Definition at line 68 of file test_sch_pin.cpp.

Referenced by TEST_SCH_PIN_FIXTURE().


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