From 3f082dbee43e6dbdb5d88fceec49298d0d2bce18 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Wed, 5 Sep 2012 17:29:23 +0000 Subject: Put extra class in the DLL, which only return the name, description(s) and Icon. Loading the Settings dialog for these resulted in loading the entire Settings-window (without showing it). Unwanted behavior... git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@125 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Filter_Base/ftnoir_filter_base.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'FTNoIR_Filter_Base') diff --git a/FTNoIR_Filter_Base/ftnoir_filter_base.h b/FTNoIR_Filter_Base/ftnoir_filter_base.h index 3d617abc..600243fc 100644 --- a/FTNoIR_Filter_Base/ftnoir_filter_base.h +++ b/FTNoIR_Filter_Base/ftnoir_filter_base.h @@ -22,10 +22,6 @@ struct IFilter virtual void Release() = 0; virtual void Initialize() = 0; virtual void FilterHeadPoseData(THeadPoseData *current_camera_position, THeadPoseData *target_camera_position, THeadPoseData *new_camera_position, bool newTarget) = 0; - - virtual void getFullName(QString *strToBeFilled) = 0; - virtual void getShortName(QString *strToBeFilled) = 0; - virtual void getDescription(QString *strToBeFilled) = 0; }; // Handle type. In C++ language the interface type is used. @@ -58,6 +54,27 @@ struct IFilterDialog { virtual void Release() = 0; // Member required to enable Auto-remove virtual void Initialize(QWidget *parent, IFilterPtr ptr) = 0; +}; + +// Handle type. In C++ language the interface type is used. +typedef IFilterDialog* FILTERDIALOGHANDLE; + +// Factory function that creates instances of the Filter object. +EXTERN_C +FTNOIR_FILTER_BASE_EXPORT +FILTERDIALOGHANDLE +__stdcall +GetFilterDialog(void); + +// COM-Like abstract interface. +// This interface doesn't require __declspec(dllexport/dllimport) specifier. +// Method calls are dispatched via virtual table. +// Any C++ compiler can use it. +// Instances are obtained via factory function. +struct IFilterDll +{ + virtual void Release() = 0; // Member required to enable Auto-remove + virtual void Initialize() = 0; virtual void getFullName(QString *strToBeFilled) = 0; virtual void getShortName(QString *strToBeFilled) = 0; @@ -66,14 +83,14 @@ struct IFilterDialog }; // Handle type. In C++ language the interface type is used. -typedef IFilterDialog* FILTERDIALOGHANDLE; +typedef IFilterDll* FILTERDLLHANDLE; // Factory function that creates instances of the Filter object. EXTERN_C FTNOIR_FILTER_BASE_EXPORT -FILTERDIALOGHANDLE +FILTERDLLHANDLE __stdcall -GetFilterDialog(void); +GetFilterDll(void); #endif // FTNOIR_FILTER_BASE_H -- cgit v1.2.3