KiCad PCB EDA Suite
pin_type.cpp File Reference

Electrical pin type handling. More...

#include "pin_type.h"
#include <macros.h>

Go to the source code of this file.

Classes

struct  pinTypeStruct
 

Functions

wxString ElectricalPinTypeGetText (ELECTRICAL_PINTYPE aType)
 
BITMAP_DEF ElectricalPinTypeGetBitmap (ELECTRICAL_PINTYPE aType)
 

Variables

const std::map< ELECTRICAL_PINTYPE, struct pinTypeStructpinTypes
 

Detailed Description

Electrical pin type handling.

Definition in file pin_type.cpp.

Function Documentation

◆ ElectricalPinTypeGetBitmap()

BITMAP_DEF ElectricalPinTypeGetBitmap ( ELECTRICAL_PINTYPE  aType)

Definition at line 69 of file pin_type.cpp.

70 {
71  auto findIt = pinTypes.find( aType );
72 
73  wxCHECK_MSG( findIt != pinTypes.end(), nullptr, "Could not find pin type in lookup map" );
74 
75  return findIt->second.bitmap;
76 }
const std::map< ELECTRICAL_PINTYPE, struct pinTypeStruct > pinTypes
Definition: pin_type.cpp:44

References pinTypes.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), LIB_PIN::GetMenuImage(), and PinTypeComboBox::PinTypeComboBox().

◆ ElectricalPinTypeGetText()

wxString ElectricalPinTypeGetText ( ELECTRICAL_PINTYPE  aType)

Definition at line 59 of file pin_type.cpp.

60 {
61  auto findIt = pinTypes.find( aType );
62 
63  wxCHECK_MSG( findIt != pinTypes.end(), wxT( "???" ), "Could not find pin type in lookup map" );
64 
65  return findIt->second.name;
66 }
const std::map< ELECTRICAL_PINTYPE, struct pinTypeStruct > pinTypes
Definition: pin_type.cpp:44

References pinTypes.

Referenced by DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), LIB_PIN::GetElectricalTypeName(), LIB_PIN::getMsgPanelInfoBase(), and PinTypeComboBox::PinTypeComboBox().

Variable Documentation

◆ pinTypes

const std::map<ELECTRICAL_PINTYPE, struct pinTypeStruct> pinTypes
Initial value:
= {
{ ELECTRICAL_PINTYPE::PT_BIDI, { _( "Bidirectional" ), pintype_bidi_xpm } },
{ ELECTRICAL_PINTYPE::PT_NC, { _( "Not connected" ), pintype_noconnect_xpm } },
}
const BITMAP_OPAQUE pintype_bidi_xpm[1]
power input (GND, VCC for ICs). Must be connected to a power output.
const BITMAP_OPAQUE pintype_openemit_xpm[1]
pin for passive components: must be connected, and can be connected to any pin
unknown electrical properties: creates always a warning when connected
const BITMAP_OPAQUE pintype_notspecif_xpm[1]
const BITMAP_OPAQUE pintype_noconnect_xpm[1]
const BITMAP_OPAQUE pintype_powerinput_xpm[1]
const BITMAP_OPAQUE pintype_passive_xpm[1]
const BITMAP_OPAQUE pintype_3states_xpm[1]
#define _(s)
Definition: 3d_actions.cpp:33
usual pin input: must be connected
input or output (like port for a microprocessor)
const BITMAP_OPAQUE pintype_poweroutput_xpm[1]
const BITMAP_OPAQUE pintype_opencoll_xpm[1]
not connected (must be left open)
const BITMAP_OPAQUE pintype_input_xpm[1]
output of a regulator: intended to be connected to power input pins
const BITMAP_OPAQUE pintype_output_xpm[1]

Definition at line 44 of file pin_type.cpp.

Referenced by ElectricalPinTypeGetBitmap(), and ElectricalPinTypeGetText().