diff options
| author | Donovan Baarda <abo@minkirri.apana.org.au> | 2014-06-12 14:53:43 +1000 |
|---|---|---|
| committer | Donovan Baarda <abo@minkirri.apana.org.au> | 2014-06-12 14:53:43 +1000 |
| commit | 0669a40347ffa233bc6042b0f65d244509a61394 (patch) | |
| tree | 36a4577bdaa1ed28ca1ad222a54777012dd2dda8 /ftnoir_filter_base | |
| parent | 72540e0a96a3120a5d02271e714aba29e136ab78 (diff) | |
| parent | 7454496476ba17ea622781d280606161581c9544 (diff) | |
Merge branch 'master' of https://github.com/opentrack/opentrack into dev/ewma2
Resolved conflicts manually in files:
ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
Diffstat (limited to 'ftnoir_filter_base')
| -rw-r--r-- | ftnoir_filter_base/ftnoir_filter_base.h | 45 | ||||
| -rw-r--r-- | ftnoir_filter_base/ftnoir_filter_base_global.h | 28 |
2 files changed, 22 insertions, 51 deletions
diff --git a/ftnoir_filter_base/ftnoir_filter_base.h b/ftnoir_filter_base/ftnoir_filter_base.h index b38fc2267..fbb0441d1 100644 --- a/ftnoir_filter_base/ftnoir_filter_base.h +++ b/ftnoir_filter_base/ftnoir_filter_base.h @@ -10,53 +10,20 @@ #include <QMessageBox>
#include <QSettings>
-////////////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-# define EXTERN_C extern "C"
-#else
-# define EXTERN_C
-#endif // __cplusplus
-
-////////////////////////////////////////////////////////////////////////////////
-// 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 ~IFilter() {}
- virtual void FilterHeadPoseData(double *current_camera_position, double *target_camera_position, double *new_camera_position, double *last_post_filter) = 0;
- virtual void Initialize() = 0;
+ virtual ~IFilter() = 0;
+ virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position) = 0;
+ virtual void reset() = 0;
};
-// Factory function that creates instances of the Filter object.
-
-////////////////////////////////////////////////////////////////////////////////
-// 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 ~IFilterDll() {}
-
- virtual void getFullName(QString *strToBeFilled) = 0;
- virtual void getShortName(QString *strToBeFilled) = 0;
- virtual void getDescription(QString *strToBeFilled) = 0;
- virtual void getIcon(QIcon *icon) = 0;
-};
+inline IFilter::~IFilter() { }
struct IFilterDialog
{
virtual ~IFilterDialog() {}
- virtual void Initialize(QWidget *parent, IFilter* ptr) = 0;
-
- virtual void getFullName(QString *strToBeFilled) {};
- virtual void getShortName(QString *strToBeFilled) {};
- virtual void getDescription(QString *strToBeFilled) {};
- virtual void getIcon(QIcon *icon) {};
+ virtual void registerFilter(IFilter* tracker) = 0;
+ virtual void unregisterFilter() = 0;
};
#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 index a923f6cf7..a1a133159 100644 --- a/ftnoir_filter_base/ftnoir_filter_base_global.h +++ b/ftnoir_filter_base/ftnoir_filter_base_global.h @@ -1,12 +1,16 @@ -#ifndef FTNOIR_FILTER_BASE_GLOBAL_H
-#define FTNOIR_FILTER_BASE_GLOBAL_H
-
-#include <QtGlobal>
-
-#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
+#ifndef FTNOIR_FILTER_BASE_GLOBAL_H +#define FTNOIR_FILTER_BASE_GLOBAL_H + +#include <QtGlobal> + +#ifndef OPENTRACK_MAIN +# if !defined(_MSC_VER) +# define FTNOIR_FILTER_BASE_EXPORT __attribute__ ((visibility ("default"))) +# else +# define FTNOIR_FILTER_BASE_EXPORT Q_DECL_EXPORT +#endif +#else +# define FTNOIR_FILTER_BASE_EXPORT Q_DECL_IMPORT +#endif + +#endif // FTNOIR_FILTER_BASE_GLOBAL_H |
