KiCad PCB EDA Suite
|
Implement a participant in the KIWAY alchemy. More...
#include <kiway.h>
Public Member Functions | |
virtual | ~KIFACE () throw () |
virtual bool | OnKifaceStart (PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway)=0 |
Called just once shortly after the DSO is loaded. | |
virtual void | OnKifaceEnd ()=0 |
Called just once just before the DSO is to be unloaded. | |
virtual void | Reset ()=0 |
Reloads global state. | |
virtual wxWindow * | CreateKiWindow (wxWindow *aParent, int aClassId, KIWAY *aKIWAY, int aCtlBits=0)=0 |
Create a wxWindow for the current project. | |
virtual void | SaveFileAs (const wxString &srcProjectBasePath, const wxString &srcProjectName, const wxString &newProjectBasePath, const wxString &newProjectName, const wxString &srcFilePath, wxString &aErrors) |
Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating). | |
virtual void * | IfaceOrAddress (int aDataId)=0 |
Return pointer to the requested object. | |
virtual void | GetActions (std::vector< TOOL_ACTION * > &aActions) const =0 |
Append this Kiface's registered actions to the given list. | |
virtual int | HandleJob (JOB *aJob) |
virtual bool | HandleJobConfig (JOB *aJob, wxWindow *aParent) |
Implement a participant in the KIWAY alchemy.
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad process. It makes it possible to call between DSOs without having to link them together. Most all calls are via virtual functions which means C++ vtables are used to hold function pointers and eliminate the need to link to specific object code libraries. There is one KIWAY in the launching portion of the process for each open KiCad project. Each project has its own KIWAY. Within a KIWAY is an actual PROJECT data structure. A KIWAY also facilitates communicating between DSOs on the topic of the project in question.
|
pure virtual |
Create a wxWindow for the current project.
The caller must cast the return value into the known type.
aParent | may be NULL or is otherwise the parent to connect under. If NULL then caller may want to connect the returned wxWindow into some hierarchy after this function returns. |
aClassId | identifies which wxFrame or wxDialog to retrieve, using a value known to the implementing KIFACE. |
aKIWAY | tells the window which KIWAY (and PROJECT) it is a participant in. |
aCtlBits | consists of bit flags from the set of KFCTL_* #defines above. |
Implemented in BMP2CMP::IFACE, CV::IFACE, SCH::IFACE, GERBV::IFACE, PGE::IFACE, PCBCALC::IFACE, PCB::IFACE, IFACE, and KIFACE_BASE.
|
pure virtual |
Append this Kiface's registered actions to the given list.
Implemented in KIFACE_BASE.
|
inlinevirtual |
Reimplemented in SCH::IFACE, and PCB::IFACE.
Definition at line 244 of file kiway.h.
Referenced by KIWAY::ProcessJob().
|
inlinevirtual |
Reimplemented in SCH::IFACE, and PCB::IFACE.
Definition at line 249 of file kiway.h.
Referenced by KIWAY::ProcessJobConfigDialog().
|
pure virtual |
Return 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. Segfaults are your fault.
aDataId | identifies which object you want the address of, and consists of choices known in advance by the implementing KIFACE. |
Implemented in BMP2CMP::IFACE, CV::IFACE, SCH::IFACE, GERBV::IFACE, PGE::IFACE, PCBCALC::IFACE, PCB::IFACE, IFACE, and KIFACE_BASE.
Referenced by ERC_TESTER::TestFootprintLinkIssues().
|
pure virtual |
Called just once just before the DSO is to be unloaded.
It is called before static C++ destructors are called. A default implementation is supplied.
Implemented in CV::IFACE, SCH::IFACE, GERBV::IFACE, KIFACE_BASE, PGE::IFACE, PCBCALC::IFACE, PCB::IFACE, and IFACE.
|
pure virtual |
Called just once shortly after the DSO is loaded.
It is the second function called, immediately after the KIFACE_GETTER(). However before either of those, static C++ constructors are called. The DSO implementation should do process level initialization here, not project specific since there will be multiple projects open eventually.
aProgram | is the process block: PGM_BASE*. |
aCtlBits | consists of bit flags from the set of KFCTL_* #defines above. |
Implemented in BMP2CMP::IFACE, CV::IFACE, SCH::IFACE, GERBV::IFACE, PGE::IFACE, PCBCALC::IFACE, PCB::IFACE, IFACE, and KIFACE_BASE.
|
pure virtual |
Reloads global state.
Implemented in SCH::IFACE, KIFACE_BASE, and PCB::IFACE.
|
inlinevirtual |
Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating).
Reimplemented in SCH::IFACE, GERBV::IFACE, PGE::IFACE, and PCB::IFACE.
Definition at line 216 of file kiway.h.
Referenced by SAVE_AS_TRAVERSER::OnFile().