62 lines
2.0 KiB
C
62 lines
2.0 KiB
C
|
#ifndef STRUCTURECALCULATIONDATA_H
|
|||
|
#define STRUCTURECALCULATIONDATA_H
|
|||
|
|
|||
|
#include "../StructureCalculation/ScantlingCalculation.h"
|
|||
|
#include "../StructureCalculation/StrengthCalculation.h"
|
|||
|
#include <QMap>
|
|||
|
#include "Serialization.h"
|
|||
|
#include "DataBlock.h"
|
|||
|
|
|||
|
// 该类是结构计算的数据容器类,继承自Serialization
|
|||
|
// 用于存储结构计算相关的数据,包括CXS中结构计算数据块,以及XSD表的内存映射
|
|||
|
class StructureCalculationData : public Serialization
|
|||
|
{
|
|||
|
public:
|
|||
|
StructureCalculationData()
|
|||
|
{
|
|||
|
}
|
|||
|
~StructureCalculationData()
|
|||
|
{
|
|||
|
for (auto it = m_DataRows.begin(); it != m_DataRows.end(); ++it)
|
|||
|
{
|
|||
|
delete it.value();
|
|||
|
}
|
|||
|
m_DataRows.clear();
|
|||
|
|
|||
|
for (auto it = m_childModules.begin(); it != m_childModules.end(); ++it)
|
|||
|
{
|
|||
|
delete it.value();
|
|||
|
}
|
|||
|
m_childModules.clear();
|
|||
|
}
|
|||
|
|
|||
|
int fromXml(const pugi::xml_node node);
|
|||
|
int toXml(pugi::xml_node node);
|
|||
|
void saveStructureCalcData(QString path);
|
|||
|
// void updateData()
|
|||
|
// {
|
|||
|
// m_CalcBaseData.updateData();
|
|||
|
// }
|
|||
|
|
|||
|
std::vector<std::string> &getAnalyseNameList();
|
|||
|
|
|||
|
private:
|
|||
|
QString getDataRowValue(const QString &key);
|
|||
|
void addOrUpdateDataRow(const QString &key, QString value = "", QString caption = "", QString remark = "");
|
|||
|
bool createDataRow(const QString &key, QString value = "", QString caption = "", QString remark = "");
|
|||
|
bool isEmpty();
|
|||
|
bool CreateChildModulus(const QString &key, QString caption = "", QString remark = "");
|
|||
|
|
|||
|
private:
|
|||
|
StructureCalDataBlock m_StructureCal; // 存储结构计算csx中xml节点值,和相关子模块
|
|||
|
|
|||
|
QMap<QString, DataRowInf *> m_DataRows; // CSX中DataRows节点下的所有数据
|
|||
|
std::vector<std::string> m_ModuleNames;
|
|||
|
|
|||
|
QMap<QString, DataRowInf *> m_childModules; // CSX中ChildModules节点下的所有子模块数据
|
|||
|
std::vector<std::string> m_childModuleNames;
|
|||
|
|
|||
|
std::unique_ptr<::strength_set::StrengthSet> m_StrengthSet; // XSD表内存映射,也是总纵强度的计算输入
|
|||
|
};
|
|||
|
|
|||
|
#endif
|