36 lines
1020 B
C
36 lines
1020 B
C
|
#ifndef ABSTRACTSPECTRUMDATAMESSAGE_H
|
||
|
#define ABSTRACTSPECTRUMDATAMESSAGE_H
|
||
|
|
||
|
#include "DataManager_Define.h"
|
||
|
#include <QTextStream>
|
||
|
#include <QVariantMap>
|
||
|
|
||
|
class AbstractSpectrumDataMessage
|
||
|
{
|
||
|
public:
|
||
|
explicit AbstractSpectrumDataMessage();
|
||
|
~AbstractSpectrumDataMessage();
|
||
|
|
||
|
QString GetSpectrumDataTypeFromFile(QString data_file);
|
||
|
QString GetSpectrumDataTypeFromMessage(QString data_msg);
|
||
|
bool AnalyseFile(QString file_name);
|
||
|
bool AnalyseMsg(QString &msg_string);
|
||
|
virtual bool IsValid(){return false;}
|
||
|
virtual const MessageInfo& GetMessageInfo();
|
||
|
virtual void ClearData();
|
||
|
|
||
|
protected:
|
||
|
virtual bool AnalyseMessgeInfo(QTextStream& content, bool only_analyse_msg=false);
|
||
|
virtual bool AnalyseMessgeBody(QTextStream& content){ Q_UNUSED(content);return false;}
|
||
|
void SetMsgDataType(QString data_type);
|
||
|
void ChangeOriginalFile(QString file_name);
|
||
|
|
||
|
private:
|
||
|
MessageInfo msg;
|
||
|
QStringList msg_items;
|
||
|
QStringList data_types;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif // ABSTRACTSPECTRUMDATAMESSAGE_H
|