KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KICAD_PLUGIN_LDR Class Referenceabstract

#include <pluginldr.h>

Inheritance diagram for KICAD_PLUGIN_LDR:
KICAD_PLUGIN_LDR_3D

Public Member Functions

 KICAD_PLUGIN_LDR ()
 
virtual ~KICAD_PLUGIN_LDR ()
 
virtual void GetLoaderVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision) const =0
 Return the version information of the Plugin Loader for plugin compatibility checking.
 
virtual bool Open (const wxString &aFullFileName)=0
 Open a plugin of the given class, performs version compatibility checks, and links all required functions.
 
virtual void Close (void)=0
 Clean up and closes/unloads the plugin.
 
std::string GetLastError (void) const
 Return the value of the internal error string.
 
char const * GetKicadPluginClass (void)
 
bool GetClassVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision)
 
bool CheckClassVersion (unsigned char Major, unsigned char Minor, unsigned char Patch, unsigned char Revision)
 
const char * GetKicadPluginName (void)
 
bool GetVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision)
 
void GetPluginInfo (std::string &aPluginInfo)
 

Protected Member Functions

bool open (const wxString &aFullFileName, const char *aPluginClass)
 Open a plugin of the specified class and links the extensions required by kicad_plugin.
 
void close (void)
 Nullify internal pointers in preparation for closing the plugin.
 
bool reopen (void)
 Reopen a plugin.
 

Protected Attributes

std::string m_error
 
wxDynamicLibrary m_PluginLoader
 

Private Attributes

bool ok
 
GET_PLUGIN_CLASS m_getPluginClass
 
GET_CLASS_VERSION m_getClassVersion
 
CHECK_CLASS_VERSION m_checkClassVersion
 
GET_PLUGIN_NAME m_getPluginName
 
GET_VERSION m_getVersion
 
wxString m_fileName
 
std::string m_pluginInfo
 

Detailed Description

Definition at line 63 of file pluginldr.h.

Constructor & Destructor Documentation

◆ KICAD_PLUGIN_LDR()

KICAD_PLUGIN_LDR::KICAD_PLUGIN_LDR ( )

◆ ~KICAD_PLUGIN_LDR()

KICAD_PLUGIN_LDR::~KICAD_PLUGIN_LDR ( )
virtual

Definition at line 56 of file pluginldr.cpp.

References close().

Member Function Documentation

◆ CheckClassVersion()

bool KICAD_PLUGIN_LDR::CheckClassVersion ( unsigned char  Major,
unsigned char  Minor,
unsigned char  Patch,
unsigned char  Revision 
)

Definition at line 380 of file pluginldr.cpp.

References m_checkClassVersion, m_error, ok, reopen(), and tracePluginLoader.

◆ close()

void KICAD_PLUGIN_LDR::close ( void  )
protected

Nullify internal pointers in preparation for closing the plugin.

Definition at line 261 of file pluginldr.cpp.

References m_checkClassVersion, m_getClassVersion, m_getPluginClass, m_getPluginName, m_getVersion, m_PluginLoader, and ok.

Referenced by KICAD_PLUGIN_LDR_3D::Close(), open(), and ~KICAD_PLUGIN_LDR().

◆ Close()

virtual void KICAD_PLUGIN_LDR::Close ( void  )
pure virtual

Clean up and closes/unloads the plugin.

Implemented in KICAD_PLUGIN_LDR_3D.

Referenced by open().

◆ GetClassVersion()

bool KICAD_PLUGIN_LDR::GetClassVersion ( unsigned char *  Major,
unsigned char *  Minor,
unsigned char *  Patch,
unsigned char *  Revision 
)

Definition at line 321 of file pluginldr.cpp.

References m_checkClassVersion, m_error, m_getClassVersion, ok, reopen(), and tracePluginLoader.

◆ GetKicadPluginClass()

char const * KICAD_PLUGIN_LDR::GetKicadPluginClass ( void  )

Definition at line 294 of file pluginldr.cpp.

References m_error, m_getPluginClass, ok, reopen(), and tracePluginLoader.

◆ GetKicadPluginName()

const char * KICAD_PLUGIN_LDR::GetKicadPluginName ( void  )

Definition at line 408 of file pluginldr.cpp.

References m_error, m_getPluginName, ok, reopen(), and tracePluginLoader.

Referenced by open().

◆ GetLastError()

std::string KICAD_PLUGIN_LDR::GetLastError ( void  ) const

Return the value of the internal error string.

Definition at line 288 of file pluginldr.cpp.

References m_error.

◆ GetLoaderVersion()

virtual void KICAD_PLUGIN_LDR::GetLoaderVersion ( unsigned char *  Major,
unsigned char *  Minor,
unsigned char *  Patch,
unsigned char *  Revision 
) const
pure virtual

Return the version information of the Plugin Loader for plugin compatibility checking.

Implemented in KICAD_PLUGIN_LDR_3D.

Referenced by open().

◆ GetPluginInfo()

void KICAD_PLUGIN_LDR::GetPluginInfo ( std::string &  aPluginInfo)

Definition at line 465 of file pluginldr.cpp.

References m_pluginInfo.

◆ GetVersion()

bool KICAD_PLUGIN_LDR::GetVersion ( unsigned char *  Major,
unsigned char *  Minor,
unsigned char *  Patch,
unsigned char *  Revision 
)

Definition at line 435 of file pluginldr.cpp.

References m_error, m_getVersion, ok, reopen(), and tracePluginLoader.

Referenced by open().

◆ Open()

virtual bool KICAD_PLUGIN_LDR::Open ( const wxString &  aFullFileName)
pure virtual

Open a plugin of the given class, performs version compatibility checks, and links all required functions.

Returns
true on success or false if failure. An error message may be accessible via GetLastError()

Implemented in KICAD_PLUGIN_LDR_3D.

Referenced by reopen().

◆ open()

bool KICAD_PLUGIN_LDR::open ( const wxString &  aFullFileName,
const char *  aPluginClass 
)
protected

Open a plugin of the specified class and links the extensions required by kicad_plugin.

Returns
true on success otherwise false.

Definition at line 63 of file pluginldr.cpp.

References close(), Close(), GetKicadPluginName(), GetLoaderVersion(), GetVersion(), LINK_ITEM, m_checkClassVersion, m_error, m_fileName, m_getClassVersion, m_getPluginClass, m_getPluginName, m_getVersion, m_pluginInfo, m_PluginLoader, ok, and tracePluginLoader.

Referenced by KICAD_PLUGIN_LDR_3D::Open().

◆ reopen()

Member Data Documentation

◆ m_checkClassVersion

CHECK_CLASS_VERSION KICAD_PLUGIN_LDR::m_checkClassVersion
private

Definition at line 143 of file pluginldr.h.

Referenced by CheckClassVersion(), close(), GetClassVersion(), KICAD_PLUGIN_LDR(), and open().

◆ m_error

◆ m_fileName

wxString KICAD_PLUGIN_LDR::m_fileName
private

Definition at line 146 of file pluginldr.h.

Referenced by open(), and reopen().

◆ m_getClassVersion

GET_CLASS_VERSION KICAD_PLUGIN_LDR::m_getClassVersion
private

Definition at line 142 of file pluginldr.h.

Referenced by close(), GetClassVersion(), KICAD_PLUGIN_LDR(), and open().

◆ m_getPluginClass

GET_PLUGIN_CLASS KICAD_PLUGIN_LDR::m_getPluginClass
private

Definition at line 141 of file pluginldr.h.

Referenced by close(), GetKicadPluginClass(), KICAD_PLUGIN_LDR(), and open().

◆ m_getPluginName

GET_PLUGIN_NAME KICAD_PLUGIN_LDR::m_getPluginName
private

Definition at line 144 of file pluginldr.h.

Referenced by close(), GetKicadPluginName(), KICAD_PLUGIN_LDR(), and open().

◆ m_getVersion

GET_VERSION KICAD_PLUGIN_LDR::m_getVersion
private

Definition at line 145 of file pluginldr.h.

Referenced by close(), GetVersion(), KICAD_PLUGIN_LDR(), and open().

◆ m_pluginInfo

std::string KICAD_PLUGIN_LDR::m_pluginInfo
private

Definition at line 147 of file pluginldr.h.

Referenced by GetPluginInfo(), and open().

◆ m_PluginLoader

wxDynamicLibrary KICAD_PLUGIN_LDR::m_PluginLoader
protected

Definition at line 137 of file pluginldr.h.

Referenced by close(), and open().

◆ ok

bool KICAD_PLUGIN_LDR::ok
private

The documentation for this class was generated from the following files: