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/nmSubWxs/nmWellEditorSession.h

84 lines
3.2 KiB
C

#pragma once
#include "nmSubWxs_global.h"
#include "nmDefines.h"
#include "nmPlotDialogContextProvider.h"
#include <QMap>
#include <QString>
class nmDataWellBase;
/**
* @brief
* @note
*/
class NM_SUB_WXS_EXPORT nmWellEditorSession
{
public:
/** @brief 创建仅持有编辑上下文副本的会话,尚不克隆原始井。 */
explicit nmWellEditorSession(const nmWellEditContext& oContext);
/** @brief 销毁所有未转移的井型工作副本。 */
~nmWellEditorSession();
/** @brief 从原始井创建当前井型工作副本。 */
bool initialize(QString& sError);
/** @brief 返回当前井型工作副本,不转移所有权。 */
nmDataWellBase* currentWell() const;
/** @brief 返回当前工作井型。 */
NM_WELL_MODEL currentWellType() const;
/** @brief 切换到指定井型并恢复或创建对应缓存。 */
bool switchWellType(NM_WELL_MODEL eWellType, QString& sError);
/** @brief 同步所有井型缓存中的井名。 */
void setWellName(const QString& sWellName);
/** @brief 设置当前工作副本的时间变表皮状态。 */
void setTimeDependentSkin(bool bEnabled);
/** @brief 返回用于井名唯一性校验的其他井名称。 */
QStringList otherWellNames() const;
/**
* @brief
* @return
*/
nmDataWellBase* takeModifiedWell();
private:
/** @brief 创建带有目标井型业务默认值的新井对象。 */
nmDataWellBase* createWell(NM_WELL_MODEL eWellType) const;
/** @brief 从已有缓存中查找与目标井型射孔语义兼容的工作副本。 */
nmDataWellBase* findCompatiblePerforationSource(
NM_WELL_MODEL eTargetType) const;
/** @brief 用共享字段和兼容的射孔业务数据初始化目标井。 */
bool initializeWorkingWell(nmDataWellBase* pSharedSource,
nmDataWellBase* pPerforationSource,
nmDataWellBase* pTarget) const;
/** @brief 白名单复制跨井型语义一致的数据,不复制井型专属几何。 */
bool copySharedWellData(nmDataWellBase* pSource,
nmDataWellBase* pTarget) const;
/**
* @brief MD
* @note
*/
void migratePerforationData(nmDataWellBase* pSource,
nmDataWellBase* pTarget) const;
/** @brief 根据目标井当前参数重新生成裂缝等派生数据。 */
void rebuildDerivedGeometry(nmDataWellBase* pWell) const;
nmWellEditContext m_oContext; ///< 只读编辑上下文。
QMap<int, nmDataWellBase*> m_mapWorkingWells; ///< 各井型独立工作副本。
int m_nCurrentWellType; ///< 当前井型枚举值。
bool m_bInitialized; ///< 会话是否初始化完成。
};