KiCad PCB EDA Suite
footprint_info.cpp File Reference
#include <common.h>
#include <fctsys.h>
#include <footprint_info.h>
#include <fp_lib_table.h>
#include <html_messagebox.h>
#include <io_mgr.h>
#include <kiface_ids.h>
#include <kiway.h>
#include <lib_id.h>
#include <macros.h>
#include <pgm_base.h>
#include <thread>
#include <utility>
#include <wildcards_and_files_ext.h>

Go to the source code of this file.

Functions

static FOOTPRINT_LISTget_instance_from_id (KIWAY &aKiway, int aId)
 

Function Documentation

◆ get_instance_from_id()

static FOOTPRINT_LIST* get_instance_from_id ( KIWAY aKiway,
int  aId 
)
static

Definition at line 111 of file footprint_info.cpp.

112 {
113  void* ptr = nullptr;
114 
115  try
116  {
117  KIFACE* kiface = aKiway.KiFACE( KIWAY::FACE_PCB );
118 
119  ptr = kiface->IfaceOrAddress( aId );
120 
121  return static_cast<FOOTPRINT_LIST*>( ptr );
122  }
123  catch( ... )
124  {
125  return nullptr;
126  }
127 }
BITMAP2CMP_SETTINGS kiface
pcbnew DSO
Definition: kiway.h:282
VTBL_ENTRY KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Function KiFACE returns the KIFACE* given a FACE_T.
Definition: kiway.cpp:178
KIFACE is used by a participant in the KIWAY alchemy.
Definition: kiway.h:150

References KIWAY::FACE_PCB, kiface, and KIWAY::KiFACE().

Referenced by FOOTPRINT_LIST::GetInstance().