28#include <wx/translation.h>
32#define PLUGIN_CLASS_3D "PLUGIN_3D"
33#define PLUGIN_3D_MAJOR 1
34#define PLUGIN_3D_MINOR 0
35#define PLUGIN_3D_PATCH 0
36#define PLUGIN_3D_REVISION 0
72 std::ostringstream ostr;
73 ostr <<
"Failed to open plugin '" << aFullFileName.ToUTF8() <<
"'";
78 " * [INFO] failed on file '%s'\n"
79 " * [INFO] error: " ),
80 __FILE__, __FUNCTION__, __LINE__, aFullFileName.ToUTF8(),
m_error );
102 "incompatible plugin (missing function 'GetNExtensions')" ),
103 __FILE__, __FUNCTION__, __LINE__ );
114 "incompatible plugin (missing function 'GetModelExtension')" ),
115 __FILE__, __FUNCTION__, __LINE__ );
131 "incompatible plugin (missing function 'GetNFilters')" ),
132 __FILE__, __FUNCTION__, __LINE__ );
148 "incompatible plugin (missing function 'GetFileFilter')" ),
149 __FILE__, __FUNCTION__, __LINE__ );
165 "incompatible plugin (missing function 'CanRender')" ),
166 __FILE__, __FUNCTION__, __LINE__ );
182 "incompatible plugin (missing function 'Load')" ),
183 __FILE__, __FUNCTION__, __LINE__ );
198 std::ostringstream ostr;
199 ostr <<
"Failed to open plugin '" << aFullFileName.ToUTF8() <<
"'; missing functions";
216 " * [INFO] closing plugin" ),
217 __FILE__, __FUNCTION__, __LINE__ );
235 unsigned char* Patch,
unsigned char* Revision )
const
260 m_error =
"[INFO] no open plugin / plugin could not be opened";
267 m_error =
"[BUG] GetNExtensions is not linked";
271 __FILE__, __FUNCTION__, __LINE__,
m_error );;
287 m_error =
"[INFO] no open plugin / plugin could not be opened";
294 m_error =
"[BUG] GetModelExtension is not linked";
298 __FILE__, __FUNCTION__, __LINE__,
m_error );;
314 m_error =
"[INFO] no open plugin / plugin could not be opened";
321 m_error =
"[BUG] GetNFilters is not linked";
325 __FILE__, __FUNCTION__, __LINE__,
m_error );;
341 m_error =
"[INFO] no open plugin / plugin could not be opened";
348 m_error =
"[BUG] GetFileFilter is not linked";
352 __FILE__, __FUNCTION__, __LINE__,
m_error );;
368 m_error =
"[INFO] no open plugin / plugin could not be opened";
375 m_error =
"[BUG] CanRender is not linked";
379 __FILE__, __FUNCTION__, __LINE__,
m_error );;
395 m_error =
"[INFO] no open plugin / plugin could not be opened";
402 m_error =
"[BUG] Load is not linked";
406 __FILE__, __FUNCTION__, __LINE__,
m_error );;
411 return m_load( aFileName );
bool Open(const wxString &aFullFileName) override
Open a plugin of the given class, performs version compatibility checks, and links all required funct...
PLUGIN_3D_GET_FILE_FILTER m_getFileFilter
SCENEGRAPH * Load(char const *aFileName)
char const * GetFileFilter(int aIndex)
PLUGIN_3D_GET_N_FILTERS m_getNFilters
virtual ~KICAD_PLUGIN_LDR_3D()
void GetLoaderVersion(unsigned char *Major, unsigned char *Minor, unsigned char *Revision, unsigned char *Patch) const override
Return the version information of the Plugin Loader for plugin compatibility checking.
PLUGIN_3D_CAN_RENDER m_canRender
PLUGIN_3D_GET_MODEL_EXTENSION m_getModelExtension
PLUGIN_3D_GET_N_EXTENSIONS m_getNExtensions
char const * GetModelExtension(int aIndex)
void Close(void) override
Clean up and closes/unloads the plugin.
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.
Define the basic data set required to represent a 3D model.
const wxChar *const tracePluginLoader
Flag to enable plugin loader trace output.
#define PLUGIN_3D_REVISION
int(* PLUGIN_3D_GET_N_EXTENSIONS)(void)
char const *(* PLUGIN_3D_GET_MODEL_EXTENSION)(int aIndex)
char const *(* PLUGIN_3D_GET_FILE_FILTER)(int aIndex)
SCENEGRAPH *(* PLUGIN_3D_LOAD)(char const *aFileName)
bool(* PLUGIN_3D_CAN_RENDER)(void)
int(* PLUGIN_3D_GET_N_FILTERS)(void)
#define LINK_ITEM(funcPtr, funcType, funcName)