#pragma once #include "iDataTypes.h" #include "ZxDynamic.h" #include "ZxDataObject.h" #include "mProjectManager_global.h" // 数据模型对象类的抽象基类 class M_PROJECTMANAGER_EXPORT ZxDataObjectEx : public ZxDataObject { //Q_OBJECT public: ZxDataObjectEx(ZxDataObject *pParent); ZxDataObjectEx(const ZxDataObjectEx& other); virtual ~ZxDataObjectEx(); public: // 接口,子类必须实现 virtual ZxDataObject* clone()/* = 0*/; virtual QString type() const/* = 0*/; // 操作符 virtual ZxDataObjectEx& operator = (const ZxDataObjectEx& other); virtual bool operator == (const ZxDataObjectEx& other) const; virtual bool operator != (const ZxDataObjectEx& other) const; // 序列化 virtual void onSerialize(ZxSerializer* ser); virtual void onDeserialize(ZxSerializer* ser); // 20240604为了方便,新增内部解析 virtual bool parseData(VecVariant vec); virtual bool sumUpData(VecVariant& vec); virtual bool _parseData(VecVariant vec, int& n); virtual bool _sumUpData(VecVariant& vec); virtual QString getTableNameBy(QString sType); void setRemark(const QString& s); QString getRemark() const; protected: QString m_sRemark; };