#ifndef TABLEALGORITHMINTERFACE
#define TABLEALGORITHMINTERFACE
#include "dataalgorithm_interface.h"
#include <QWidget>
#include "stable.h"
#include <QVector>
#include <QStringList>

class TableAlgorithmInterface:public DataAlgorithmInterface{
public:
    void setSource(QWidget *qwidget);
    bool ReloadColumn();
    TableAlgorithmInterface();
    ~TableAlgorithmInterface();

    void setIndex();
    void setColumnIndex();
    QString getArticleID();
    QString getKeywordID();
    QString getPlatformName();
    QString getPlatformForm();
    QString getArticleForm();
    QString getArticleNickname();
    QString getArticleDate();
    QString getArticleTitle();
    QString getArticleData();
    QString getArticleUrl();
    QString getArticleParent();
    QString getArticleOrder();
    QString getReplyUrl();
    QString getArticleHit();
    QString getArticleProfileUrl();
    QString getArticleProfile();
    QString getEtc();
    QString getPlatformTitle();
    QString getPlatformID();

    void next();
    bool hasNext();
    int currentIndex();
    void seek(int n);
    int length();
    void reset();
    void moveFirst();
    void moveLast();

private:
    STable *m_pCurrentTable;
    QVector <QStringList> m_vecColumn;
    int m_anData[E_DATA_MAX];
    int m_nIndex;
};


#endif // TABLEALGORITHMINTERFACE

