24#include <wx/translation.h>
28#define PLUGIN_CLASS_3D "PLUGIN_3D"
29#define PLUGIN_3D_MAJOR 1
30#define PLUGIN_3D_MINOR 0
31#define PLUGIN_3D_PATCH 0
32#define PLUGIN_3D_REVISION 0
68 std::ostringstream ostr;
69 ostr <<
"Failed to open plugin '" << aFullFileName.ToUTF8() <<
"'";
74 " * [INFO] failed on file '%s'\n"
75 " * [INFO] error: " ),
76 __FILE__, __FUNCTION__, __LINE__, aFullFileName.ToUTF8(),
m_error );
98 "incompatible plugin (missing function 'GetNExtensions')" ),
99 __FILE__, __FUNCTION__, __LINE__ );
110 "incompatible plugin (missing function 'GetModelExtension')" ),
111 __FILE__, __FUNCTION__, __LINE__ );
127 "incompatible plugin (missing function 'GetNFilters')" ),
128 __FILE__, __FUNCTION__, __LINE__ );
144 "incompatible plugin (missing function 'GetFileFilter')" ),
145 __FILE__, __FUNCTION__, __LINE__ );
161 "incompatible plugin (missing function 'CanRender')" ),
162 __FILE__, __FUNCTION__, __LINE__ );
178 "incompatible plugin (missing function 'Load')" ),
179 __FILE__, __FUNCTION__, __LINE__ );
194 std::ostringstream ostr;
195 ostr <<
"Failed to open plugin '" << aFullFileName.ToUTF8() <<
"'; missing functions";
212 " * [INFO] closing plugin" ),
213 __FILE__, __FUNCTION__, __LINE__ );
231 unsigned char* Patch,
unsigned char* Revision )
const
256 m_error =
"[INFO] no open plugin / plugin could not be opened";
263 m_error =
"[BUG] GetNExtensions is not linked";
267 __FILE__, __FUNCTION__, __LINE__,
m_error );;
283 m_error =
"[INFO] no open plugin / plugin could not be opened";
290 m_error =
"[BUG] GetModelExtension is not linked";
294 __FILE__, __FUNCTION__, __LINE__,
m_error );;
310 m_error =
"[INFO] no open plugin / plugin could not be opened";
317 m_error =
"[BUG] GetNFilters is not linked";
321 __FILE__, __FUNCTION__, __LINE__,
m_error );;
337 m_error =
"[INFO] no open plugin / plugin could not be opened";
344 m_error =
"[BUG] GetFileFilter is not linked";
348 __FILE__, __FUNCTION__, __LINE__,
m_error );;
364 m_error =
"[INFO] no open plugin / plugin could not be opened";
371 m_error =
"[BUG] CanRender is not linked";
375 __FILE__, __FUNCTION__, __LINE__,
m_error );;
391 m_error =
"[INFO] no open plugin / plugin could not be opened";
398 m_error =
"[BUG] Load is not linked";
402 __FILE__, __FUNCTION__, __LINE__,
m_error );;
407 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)