KiCad PCB EDA Suite
Loading...
Searching...
No Matches
project_rescue.cpp File Reference
#include <sch_draw_panel.h>
#include <symbol_library.h>
#include <confirm.h>
#include <connection_graph.h>
#include <invoke_sch_dialog.h>
#include <kiway.h>
#include <symbol_viewer_frame.h>
#include <project_rescue.h>
#include <project_sch.h>
#include <sch_symbol.h>
#include <sch_sheet.h>
#include <sch_edit_frame.h>
#include <schematic.h>
#include <string_utils.h>
#include <symbol_lib_table.h>
#include <wildcards_and_files_ext.h>
#include <wx/msgdlg.h>
#include <cctype>
#include <map>

Go to the source code of this file.

Typedefs

typedef std::pair< SCH_SYMBOL *, wxString > SYMBOL_NAME_PAIR
 

Functions

static bool sort_by_libid (const SCH_SYMBOL *ref, SCH_SYMBOL *cmp)
 
static void getSymbols (SCHEMATIC *aSchematic, std::vector< SCH_SYMBOL * > &aSymbols)
 Fill a vector with all of the project's symbols, to ease iterating over them.
 
static LIB_SYMBOLfindSymbol (const wxString &aName, SYMBOL_LIBS *aLibs, bool aCached)
 Search the libraries for the first symbol with a given name.
 
static wxFileName GetRescueLibraryFileName (SCHEMATIC *aSchematic)
 

Typedef Documentation

◆ SYMBOL_NAME_PAIR

typedef std::pair<SCH_SYMBOL*, wxString> SYMBOL_NAME_PAIR

Definition at line 48 of file project_rescue.cpp.

Function Documentation

◆ findSymbol()

static LIB_SYMBOL * findSymbol ( const wxString &  aName,
SYMBOL_LIBS aLibs,
bool  aCached 
)
static

Search the libraries for the first symbol with a given name.

Parameters
aName- name to search for
aLibs- the loaded SYMBOL_LIBS
aCached- whether we are looking for the cached symbol

Definition at line 93 of file project_rescue.cpp.

Referenced by RESCUE_CACHE_CANDIDATE::FindRescues(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().

◆ GetRescueLibraryFileName()

◆ getSymbols()

static void getSymbols ( SCHEMATIC aSchematic,
std::vector< SCH_SYMBOL * > &  aSymbols 
)
static

Fill a vector with all of the project's symbols, to ease iterating over them.

The list is sorted by LIB_ID, therefore symbols using the same library symbol are grouped, allowing later faster calculations (one library search by group of symbols)

Parameters
aSymbolsis a vector that will take the symbols.

Definition at line 67 of file project_rescue.cpp.

References SCH_SCREENS::GetFirst(), SCH_SCREENS::GetNext(), SCHEMATIC::Root(), SCH_SYMBOL_T, and sort_by_libid().

Referenced by RESCUER::RESCUER().

◆ sort_by_libid()

static bool sort_by_libid ( const SCH_SYMBOL ref,
SCH_SYMBOL cmp 
)
static

Definition at line 52 of file project_rescue.cpp.

References SCH_SYMBOL::GetLibId().

Referenced by getSymbols().