summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-01-08 11:36:51 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-01-08 11:36:51 +0000
commit81c1342c702aa207113b8ac3c52d527e4c99e5b9 (patch)
tree09f3e838cb7087f45a4998d5eeaa9c330c1a8cf9
parent17fcad9850754d2d0ec662c46e7940b07b64804c (diff)
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
-rw-r--r--FTNoIR_Filter_Base/ftnoir_filter_base.h77
-rw-r--r--FTNoIR_Filter_Base/ftnoir_filter_base_global.h12
2 files changed, 89 insertions, 0 deletions
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 <QString>
+#include <QList>
+#include <QFile>
+#include <QCoreApplication>
+#include <QMessageBox>
+#include <QSettings>
+
+// 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 <Qt/qglobal.h>
+
+#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