From 81c1342c702aa207113b8ac3c52d527e4c99e5b9 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sun, 8 Jan 2012 11:36:51 +0000 Subject: Split filterbase for future instances. BTW.: This split is required to prevent a Qt LINKER error... strange but true! git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@95 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Filter_Base/ftnoir_filter_base.h | 77 ++++++++++++++++++++++++++ FTNoIR_Filter_Base/ftnoir_filter_base_global.h | 12 ++++ 2 files changed, 89 insertions(+) create mode 100644 FTNoIR_Filter_Base/ftnoir_filter_base.h create mode 100644 FTNoIR_Filter_Base/ftnoir_filter_base_global.h diff --git a/FTNoIR_Filter_Base/ftnoir_filter_base.h b/FTNoIR_Filter_Base/ftnoir_filter_base.h new file mode 100644 index 00000000..0262b4eb --- /dev/null +++ b/FTNoIR_Filter_Base/ftnoir_filter_base.h @@ -0,0 +1,77 @@ +#ifndef FTNOIR_FILTER_BASE_H +#define FTNOIR_FILTER_BASE_H + +#include "ftnoir_filter_base_global.h" +#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h" +#include +#include +#include +#include +#include +#include + +// 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 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 getFilterFullName(QString *strToBeFilled) = 0; + virtual void getFilterShortName(QString *strToBeFilled) = 0; + virtual void getFilterDescription(QString *strToBeFilled) = 0; + + //parameter value get/set - returns true if successful, false if not + virtual bool setParameterValue(const int index, const float newvalue) = 0; +}; + +// Handle type. In C++ language the interface type is used. +typedef IFilter* FILTERHANDLE; + +//////////////////////////////////////////////////////////////////////////////// +// +#ifdef __cplusplus +# define EXTERN_C extern "C" +#else +# define EXTERN_C +#endif // __cplusplus + +// Factory function that creates instances of the Filter object. +EXTERN_C +FTNOIR_FILTER_BASE_EXPORT +FILTERHANDLE +__stdcall +GetFilter( + 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 IFilterDialog +{ + virtual void Release() = 0; // Member required to enable Auto-remove + virtual void Initialize(QWidget *parent) = 0; + + virtual void getFilterFullName(QString *strToBeFilled) = 0; + virtual void getFilterShortName(QString *strToBeFilled) = 0; + virtual void getFilterDescription(QString *strToBeFilled) = 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); + + +#endif // FTNOIR_FILTER_BASE_H diff --git a/FTNoIR_Filter_Base/ftnoir_filter_base_global.h b/FTNoIR_Filter_Base/ftnoir_filter_base_global.h new file mode 100644 index 00000000..aac4048e --- /dev/null +++ b/FTNoIR_Filter_Base/ftnoir_filter_base_global.h @@ -0,0 +1,12 @@ +#ifndef FTNOIR_FILTER_BASE_GLOBAL_H +#define FTNOIR_FILTER_BASE_GLOBAL_H + +#include + +#ifdef FTNOIR_FILTER_BASE_LIB +# define FTNOIR_FILTER_BASE_EXPORT Q_DECL_EXPORT +#else +# define FTNOIR_FILTER_BASE_EXPORT Q_DECL_IMPORT +#endif + +#endif // FTNOIR_FILTER_BASE_GLOBAL_H -- cgit v1.2.3