summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.h
diff options
context:
space:
mode:
authorPatrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb>2012-09-21 14:00:34 +0000
committerPatrick Ruoff <c14-radioactive@19e81ba0-9b1a-49c3-bd6c-561e1906d5fb>2012-09-21 14:00:34 +0000
commitab0d60becc2d1b89c812193c179892d6acd4912f (patch)
tree2dae7d2c10e1cc3a5bd73ee8ae2ee609c69a1b7b /FaceTrackNoIR/FaceTrackNoIR.h
parentddc63cdda186fe31435fde839c3d5b68040a0d0f (diff)
RAII-style dll management 1: Replaced autoptr and release with virtual destructors
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@155 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.h')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
index d2b9cdde..e3cf798e 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.h
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -42,26 +42,16 @@
#include "ui_FTNoIR_Preferences.h"
#include "ui_FTNoIR_Curves.h"
-//
#include "..\ftnoir_protocol_base\FTNoIR_Protocol_base.h"
#include "..\ftnoir_tracker_base\FTNoIR_Tracker_base.h"
#include "..\ftnoir_filter_base\FTNoIR_Filter_base.h"
-#include "AutoClosePtr.h"
-// 1a. COM-Like usage with smart pointer.
-// No need to call `ITracker::Release'; the instance will
-// be released automatically in destructor of the smart pointer.
-//typedef AutoClosePtr<ITrackerDialog, void, &ITrackerDialog::Release> ITrackerDialogPtr;
-typedef ITrackerDialog *(WINAPI *importGetTrackerDialog)(void);
-typedef ITrackerDll *(WINAPI *importGetTrackerDll)(void);
-
-typedef AutoClosePtr<IProtocolDialog, void, &IProtocolDialog::Release> IProtocolDialogPtr;
-typedef IProtocolDialog *(WINAPI *importGetProtocolDialog)(void);
-typedef AutoClosePtr<IFilterDialog, void, &IFilterDialog::Release> IFilterDialogPtr;
-typedef IFilterDialog *(WINAPI *importGetFilterDialog)(void);
-
-typedef AutoClosePtr<IFilterDll, void, &IFilterDll::Release> IFilterDllPtr;
-typedef IFilterDll *(WINAPI *importGetFilterDll)(void);
+typedef ITrackerDialogPtr (WINAPI *importGetTrackerDialog)(void);
+typedef ITrackerDllPtr (WINAPI *importGetTrackerDll)(void);
+typedef IProtocolDialogPtr (WINAPI *importGetProtocolDialog)(void);
+//typedef IProtocolDllPtr (WINAPI *importGetProtocolDll)(void);
+typedef IFilterDialogPtr (WINAPI *importGetFilterDialog)(void);
+typedef IFilterDllPtr (WINAPI *importGetFilterDll)(void);
#include <Dshow.h>
@@ -93,7 +83,7 @@ private:
QStringList filterFileList; // List of Filter-DLL-files, that are present in the program-folder
QStringList trackerFileList; // List of Tracker-DLL-files, that are present in the program-folder
- ITrackerDialog *pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
+ ITrackerDialogPtr pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
IProtocolDialogPtr pProtocolDialog; // Pointer to Protocol dialog instance (in DLL)
IFilterDialogPtr pFilterDialog; // Pointer to Filter dialog instance (in DLL)