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/nmNum/nmData/nmDataUtils.h

55 lines
1.7 KiB
C

#pragma once
#include "ZxDataObject.h"
#include "nmData_global.h"
#include <QVector>
class ZxDataProject;
class ZxDataWell;
class QMutex;
// 数值试井数据对象如何进行初始加载的方式
class NM_DATA_EXPORT nmDataUtils : public QObject
{
public:
nmDataUtils();
~nmDataUtils();
// 对数据对象的children进行外部扩充:ZxDataProject 和 ZxDataWell
static bool extendChildrenOfProj(ZxDataProject* pDataProj);
static bool extendChildrenOfWell(ZxDataWell* pDataWell);
// 删除井时,也需要进行外部扩充式删除(注意:工区Project不需要,只需要井接口)
static bool deleteChildrenOfWell(ZxDataWell* pDataWell);
static QStringList readNmDataFile(const QString &filePath);
/** @brief 返回所有 HX_NWTM.dll 接口共用的进程级互斥锁。 */
static QMutex* getHxNwtmDllMutex();
/**
* @brief 调用 HX_NWTM_PLOT 生成双对数和半对数曲线。
*
* flowDurations 保存各流动段持续时间;flowSectionIndex 是一基索引。
* 本方法会把当前流动段换算成累计的 tmin/tmax,并统一完成 DLL 加载、
* 接口探测、输入转换和输出校验。
*/
static bool calculateHxNwtmPlot(
const QVector<double>& flowDurations,
const QVector<double>& rates,
const QVector<double>& pressureTimes,
const QVector<double>& pressures,
int flowSectionIndex,
const QString& licensePath,
QVector<QVector<double> >& logLog,
QVector<QVector<double> >& semiLog,
bool* interfaceAvailable = 0,
QString* errorMessage = 0);
};