#ifndef YMORPHERETHREAD
#define YMORPHERETHREAD
#include <QThread>
#include <QMap>
#include <QString>
#include "dataalgorithm_interface.h"
#include <QMutex>
class YMorphereThread:public QThread{
    Q_OBJECT
protected:
    QMutex* mutex;
    QMap<QString, QString> m_mapParam;
    DataAlgorithmInterface* m_pDAInterface;
    QMap<QString, int> m_mapResult;
    QMap<QString, int>* m_pmapResult;
    QString m_strName;
    enum {
        MONDAY = 1,
        TUESDAY,
        WEDNESDAY,
        THURSDAY,
        FRIDAY,
        SATURDAY,
        SUNDAY
    };

    enum
    {
        WEEK = 7
    };


private:
    virtual void parseParam() = 0;


public:
    void setParam(QMap <QString, QString> mapParam);
    void setMutex(QMutex* mutex);
    void setID(int nID);
    void setDataAlgorithmInterface(DataAlgorithmInterface* DAInterface);
    void setMemory(QMap <QString, int> *threadMap);
    QMap<QString, int> getResult();
    void clearResult();
    void clearpResult();
    QString getWeeksInMonth(unsigned int _nDate);

    //virtual void setup() = 0;

};


#endif // YMORPHERETHREAD

