|
|
|
|
@ -131,6 +131,9 @@ rapidjson::Value nmDataReservoir::ToJsonValue(rapidjson::Document::AllocatorType
|
|
|
|
|
reservoirObject.AddMember("Sgi", m_Sgi.ToJsonValue(allocator), allocator);
|
|
|
|
|
reservoirObject.AddMember("Swi", m_Swi.ToJsonValue(allocator), allocator);
|
|
|
|
|
|
|
|
|
|
// 多相流类型
|
|
|
|
|
reservoirObject.AddMember("PhaseType", static_cast<int>(m_ePhaseType), allocator);
|
|
|
|
|
|
|
|
|
|
return reservoirObject; // 返回序列化后的 RapidJSON Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -204,6 +207,11 @@ void nmDataReservoir::FromJsonValue(const rapidjson::Value& jsonValue)
|
|
|
|
|
if (jsonValue.HasMember("Swi") && jsonValue["Swi"].IsObject()) {
|
|
|
|
|
m_Swi.FromJsonValue(jsonValue["Swi"]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 多相流类型
|
|
|
|
|
if (jsonValue.HasMember("PhaseType") && jsonValue["PhaseType"].IsInt()) {
|
|
|
|
|
m_ePhaseType = static_cast<NM_PHASE_TYPE>(jsonValue["PhaseType"].GetInt());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|