KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_calculator.cpp File Reference

Go to the source code of this file.

Classes

struct  PCBCALC::IFACE
 

Namespaces

namespace  PCBCALC
 

Functions

const wxString PcbCalcDataFileExt (wxT("pcbcalc"))
 
PCBCALC::IFACE KIFACE_BASE PCBCALC::kiface ("pcb_calculator", KIWAY::FACE_PCB_CALCULATOR)
 
 IFACE (const char *aName, KIWAY::FACE_T aType)
 
bool OnKifaceStart (PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway) override
 
void OnKifaceEnd () override
 
wxWindow * CreateKiWindow (wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
 
void * IfaceOrAddress (int aDataId) override
 Return a pointer to the requested object. More...
 
KIFACE_BASEKiface ()
 Global KIFACE_BASE "get" accessor. More...
 
KIFACE_API KIFACEKIFACE_GETTER (int *aKIFACEversion, int aKiwayVersion, PGM_BASE *aProgram)
 No name mangling. Each KIFACE (DSO/DLL) will implement this once. More...
 
PGM_BASEPgm ()
 The global Program "get" accessor. More...
 
PGM_BASEPgmOrNull ()
 similar to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from a script, not from a kicad appl More...
 

Variables

static PGM_BASEprocess
 

Function Documentation

◆ CreateKiWindow()

wxWindow * kiface::CreateKiWindow ( wxWindow *  aParent,
int  aClassId,
KIWAY aKiway,
int  aCtlBits = 0 
)
override

Definition at line 10 of file pcb_calculator.cpp.

◆ IFACE()

kiface::IFACE ( const char *  aName,
KIWAY::FACE_T  aType 
)

Definition at line 2 of file pcb_calculator.cpp.

◆ IfaceOrAddress()

void * kiface::IfaceOrAddress ( int  aDataId)
override

Return a pointer to the requested object.

The safest way to use this is to retrieve a pointer to a static instance of an interface, similar to how the KIFACE interface is exported. But if you know what you are doing use it to retrieve anything you want.

Parameters
aDataIdidentifies which object you want the address of.
Returns
the requested object and must be cast into the know type.

Definition at line 26 of file pcb_calculator.cpp.

◆ Kiface()

KIFACE_BASE & Kiface ( )

Global KIFACE_BASE "get" accessor.

Definition at line 78 of file pcb_calculator.cpp.

References PCBCALC::kiface().

◆ KIFACE_GETTER()

KIFACE_API KIFACE * KIFACE_GETTER ( int *  aKIFACEversion,
int  aKiwayVersion,
PGM_BASE aProgram 
)

No name mangling. Each KIFACE (DSO/DLL) will implement this once.

Definition at line 83 of file pcb_calculator.cpp.

References PCBCALC::kiface(), and process.

◆ OnKifaceEnd()

void kiface::OnKifaceEnd ( )
override

Definition at line 11 of file test_app_main.cpp.

◆ OnKifaceStart()

bool kiface::OnKifaceStart ( PGM_BASE aProgram,
int  aCtlBits,
KIWAY aKiway 
)
override

Definition at line 6 of file test_app_main.cpp.

◆ PcbCalcDataFileExt()

const wxString PcbCalcDataFileExt ( wxT("pcbcalc")  )

◆ Pgm()

PGM_BASE & Pgm ( )

The global Program "get" accessor.

Implemented in: 1) common/single_top.cpp, 2) kicad/kicad.cpp, and 3) scripting/kiway.i

Definition at line 90 of file pcb_calculator.cpp.

References process.

◆ PgmOrNull()

PGM_BASE * PgmOrNull ( )

similar to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from a script, not from a kicad appl

Definition at line 98 of file pcb_calculator.cpp.

References process.

Variable Documentation

◆ process

PGM_BASE* process
static

Definition at line 75 of file pcb_calculator.cpp.

Referenced by KIFACE_GETTER(), Pgm(), and PgmOrNull().