#include "nmDataOilReservoirOutline.h" #include "nmDefines.h" ZX_DEFINE_DYNAMIC(DataOilReservoirOutline, nmDataOilReservoirOutline) nmDataOilReservoirOutline::nmDataOilReservoirOutline(): ZxDataObjectDbl(0) { //m_sID = ""; // m_sWellCode = ""; //m_sName = ""; // m_dTopDepth = 0.00; // m_dBottomDepth = 0.00; m_sRemark = ""; m_sCth = "nmDORO"; checkXmlTable(); } nmDataOilReservoirOutline::nmDataOilReservoirOutline(const nmDataOilReservoirOutline &other) : ZxDataObjectDbl(other) { if (this == &other) { return; } checkXmlTable(); //m_sID = other.m_sID; // m_sWellCode = other.m_sWellCode; //m_sName = other.m_sName; // m_dTopDepth = other.m_dTopDepth; // m_dBottomDepth = other.m_dBottomDepth; } nmDataOilReservoirOutline::~nmDataOilReservoirOutline() { } nmDataOilReservoirOutline &nmDataOilReservoirOutline::operator = (const nmDataOilReservoirOutline &other) { //m_sID = other.m_sID; // m_sWellCode = other.m_sWellCode; //m_sName = other.m_sName; // m_dTopDepth = other.m_dTopDepth; // m_dBottomDepth = other.m_dBottomDepth; return *this; } ZxDataObject* nmDataOilReservoirOutline::clone() { ensureLoaded(); return (new nmDataOilReservoirOutline(*this)); } QString nmDataOilReservoirOutline::type() const { return nmDataModelType::sTypeNumDataOilReservoirOutline; } QString nmDataOilReservoirOutline::getTableName() { // 返回表名,模型自行处理 return nmDataTableName::sTableNumDataOilReservoirOutline; } bool nmDataOilReservoirOutline::_parseData(VecVariant vec, int& n) { m_sCode = vec.at(n++).toString(); // m_sWellCode = vec.at(n++).toString(); m_sName = vec.at(n++).toString(); // m_dTopDepth = vec.at(n++).toDouble(); // m_dBottomDepth = vec.at(n++).toDouble(); return ZxDataObjectDbl::_parseData(vec, n); } bool nmDataOilReservoirOutline::_sumUpData(VecVariant& vec) { ensureLoaded(); vec.append(m_sCode); // vec.append(m_sWellCode); vec.append(m_sName); // vec.append(m_dTopDepth); // vec.append(m_dBottomDepth); return ZxDataObjectDbl::_sumUpData(vec); } void nmDataOilReservoirOutline::onSerialize(ZxSerializer* ser) { ZxDataObjectDbl::onSerialize(ser); // ser->write("WellCode", m_sWellCode); // ser->write("TopDepth", m_dTopDepth); // ser->write("BottomDepth", m_dBottomDepth); } void nmDataOilReservoirOutline::onDeserialize(ZxSerializer* ser) { ZxDataObjectDbl::onDeserialize(ser); // ser->read("WellCode", m_sWellCode); // ser->read("TopDepth", m_dTopDepth); // ser->read("BottomDepth", m_dBottomDepth); } QIcon nmDataOilReservoirOutline::getIcon(bool expanded) const { return zxLoadIcon("DataOilReservoirOutline"); }