You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/iData/iFileEngine/iTryParseHelper.h

46 lines
987 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Defines.h"
#include "iFileEngine.h"
#include "iFileEngine_global.h"
// 专用解析tryParse
class I_FILE_ENGINE_EXPORT iTryParseHelper
{
public:
iTryParseHelper();
~iTryParseHelper();
public:
iFileEngineUtils::fprParseResult getRsts();
QString getLastError();
// 尝试对名称和单位的模糊解析
virtual bool tryParse(const VVecVariant& vvec);
protected:
// 利用倒回两行try查找标题单位
//
virtual bool tryParseTitleUnit(const VecVariant& vec);
virtual bool tryParseTitle(const VecVariant& vec);
// 判断改行是否全是数字
bool isDigitLine(const VecVariant& vec);
protected:
protected:
iFileEngineUtils::fprParseResult m_oRst;
int m_nDataRowCountPreviewed;//头包含多少行数据,默认为2外界可传入
int m_nDataLineTryMax; //在try时数据多少条即可认为是数据默认为3
QString m_sError; //存错误信息
};