SpikeStream Application Library  0.2
AbstractAnalysisTimeStepThread.h
Go to the documentation of this file.
00001 #ifndef ABSTRACTANALYSISTIMESTEPTHREAD_H
00002 #define ABSTRACTANALYSISTIMESTEPTHREAD_H
00003 
00004 //SpikeStream includes
00005 #include "DBInfo.h"
00006 #include "NetworkDao.h"
00007 #include "ArchiveDao.h"
00008 #include "AnalysisInfo.h"
00009 
00010 //Qt includes
00011 #include <QThread>
00012 
00013 namespace spikestream {
00014 
00017         class AbstractAnalysisTimeStepThread : public QThread {
00018                 Q_OBJECT
00019 
00020                 public:
00021                         AbstractAnalysisTimeStepThread(const DBInfo& netDBInfo, const DBInfo& archDBInfo, const DBInfo& anaDBInfo);
00022                         virtual ~AbstractAnalysisTimeStepThread();
00023                         void clearError();
00024                         QString getErrorMessage() { return errorMessage; }
00025                         int getTimeStep() { return timeStep; }
00026                         bool isError() { return error; }
00027                         virtual void prepareTimeStepAnalysis(const AnalysisInfo& anaInfo, int timeStep);
00028                         virtual void run() = 0;
00029                         void stopThread();
00030 
00031                 signals:
00032                         void newResultsFound();
00033                         void progress(const QString& msg, unsigned int timeStep, unsigned int stepsCompleted, unsigned int totalSteps);
00034 
00035                 protected slots:
00036                         void updateResults();
00037                         void updateProgress(const QString& msg, unsigned int timeStep, unsigned int stepsCompleted, unsigned int totalSteps);
00038 
00039                 protected:
00040                         //========================  VARIABLES  ========================
00042                         DBInfo networkDBInfo;
00043 
00045                         DBInfo archiveDBInfo;
00046 
00048                         DBInfo analysisDBInfo;
00049 
00051                         bool stop;
00052 
00054                         AnalysisInfo analysisInfo;
00055 
00057                         int timeStep;
00058 
00060                         bool error;
00061 
00063                         QString errorMessage;
00064 
00065 
00066                         //=======================  METHODS  =======================
00067                         void setError(const QString& message);
00068 
00069         };
00070 
00071 }
00072 
00073 #endif//ABSTRACTANALYSISTIMESTEPTHREAD_H
 All Classes Files Functions Variables Typedefs Friends Defines