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.
nmWATI/Include/mTool/mToolPvt/iPvtParaCalRst.h

93 lines
2.8 KiB
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 "IxSerDes.h"
#include "mToolPvt_global.h"
// 该类PVT每个参数的计算结果信息比较全
class M_TOOL_PVT_EXPORT iPvtParaCalRst : virtual public IxSerDes
{
public:
iPvtParaCalRst(QObject* parent = 0);
iPvtParaCalRst(const iPvtParaCalRst &other);
~iPvtParaCalRst();
// 克隆
iPvtParaCalRst* clone();
// 数据重置
void reset();
public:
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
public:
/// @brief 设置参数的某种方法计算结果
/// @param sMethod 计算方法标识(英文,方法名)
/// @param vecYs 计算结果y列/y轴
/// @param vecXs x列/x轴如果非空则全局替换x
void setMethodRsData(QString sMethod, VecDouble& vecYs);
void setMethodRsData(QString sMethod, VecDouble& vecXs, VecDouble& vecYs);
/// @brief 获取参数的某种方法计算结果
/// @param sMethod 计算方法标识(英文,方法名)
/// @param vecXs 计算结果返回x列/x轴
/// @param vecYs 计算结果返回y列/y轴
/// @param vecPts 计算结果,按点返回
bool getMethodRsData(QString sMethod, VecDouble& vecYs);
bool getMethodRsData(QString sMethod, VecDouble& vecXs, VecDouble& vecYs);
bool getMethodRsData(QString sMethod, VecPointF& vecPts);
/// @brief 获取参数的指定/所有方法计算结果
/// @param vvec 返回结果
/// @param listMethods 指定方法标识,如果为空则所有
/// @param pListTitles 标题
/// @note 1.形式为ZxTableView显示的样式每一行为多个方法结果依次排开
/// 2.每一行x为第一个其它顺序按照listMethods进行
/// 如果listMethods为空则依次为x,m_sMethodBase,其它
bool getAllMethodRsData(VVecDouble& vvec, \
QStringList listMethods = QStringList(), \
QStringList* pListTitles = NULL);
/// @brief 返回数值指针
QMap<QString, VecDouble>* getRstDataPtrs();
/// @brief 结果点
void setPtResult(QPointF& pt);
QPointF getPtResult();
/// @brief Pb参考点
void setPtReferPb(QPointF& pt);
QPointF getPtReferPb();
private:
bool makesureListMethods(QStringList& listMethods);
public:
QString m_sPhaseType; //流体类型/油气水
QString m_sPara; //参数标识(英文)
QString m_sMethodBase; //基准计算方法(以哪个为准)
private:
// 结果:数据,各个计算方法对应的数据
// 注意所有方法对应的x列为一致的
QMap<QString, VecDouble> m_mapRsDatas;
// 结果:特殊点
QPointF m_ptResult;
QPointF m_ptReferPb;
private:
QString m_sColX;
};