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/nmPebiResultSnapshotSeriali...

55 lines
2.1 KiB
C

#ifndef NMPEBIRESULTSNAPSHOTSERIALIZER_H
#define NMPEBIRESULTSNAPSHOTSERIALIZER_H
#include "nmData_global.h"
#include "nmNumericalResultPersistence.h"
#include <QSharedPointer>
#include <QString>
class nmPebiResultSnapshot;
/**
* @brief v4 Snapshot.json
*
* VTK
* nmPebiResultSnapshotBuilder
*/
class NM_DATA_EXPORT nmPebiResultSnapshotSerializer
{
public:
/** @brief 将完整快照写入窗口目录下的 Snapshot 子目录。 */
static bool save(
const QSharedPointer<const nmPebiResultSnapshot>& pSnapshot,
const QString& sWindowDirectory,
nmNumericalFileReference& oSnapshotJsonReference,
QString* pError = NULL);
/** @brief 校验 Snapshot.json 及其三条引用,不创建快照对象。 */
static bool validate(
const QString& sWindowDirectory,
const nmNumericalFileReference& oSnapshotJsonReference,
QString* pError = NULL);
/** @brief 完整读取并通过 Builder 返回尚未发布的可写候选。 */
static bool load(
const QString& sWindowDirectory,
const nmNumericalFileReference& oSnapshotJsonReference,
QSharedPointer<nmPebiResultSnapshot>& pCandidate,
QString* pError = NULL);
private:
/** @brief 从快照内部数组流式写出全部压力帧。 */
static bool writePressureFrames(const nmPebiResultSnapshot& oSnapshot,
const QString& sFilePath,
QString* pError);
/** @brief 从快照内部井目录流式写出六组冻结曲线。 */
static bool writeWellCurves(const nmPebiResultSnapshot& oSnapshot,
const QString& sFilePath,
QString* pError);
/** @brief 禁止实例化纯静态序列化器。 */
nmPebiResultSnapshotSerializer();
};
#endif // NMPEBIRESULTSNAPSHOTSERIALIZER_H