|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iXmlTable.h"
|
|
|
|
|
#include "iModelInfoBase.h"
|
|
|
|
|
#include "iModelDescGroup.h"
|
|
|
|
|
#include "iParameterGroup.h"
|
|
|
|
|
#include "iXmlUtilBase.h"
|
|
|
|
|
|
|
|
|
|
// 加载模型结构体
|
|
|
|
|
class I_XMLMANAGER_EXPORT iXmlUtilModels : public iXmlUtilBase
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/// @brief 加载模型结构体
|
|
|
|
|
/// @param pVecWbs...各种不同的模型结构体。
|
|
|
|
|
/// 如果不想解析某一参数,直接传入NULL即可
|
|
|
|
|
/// @param sFile:Xml对应文件
|
|
|
|
|
static bool loadStructs(vecModelInfoBasesPtr* pVecWbs,
|
|
|
|
|
vecModelInfoBasesPtr* pVecWel,
|
|
|
|
|
vecModelInfoBasesPtr* pVecRes,
|
|
|
|
|
vecModelInfoBasesPtr* pVecBdy,
|
|
|
|
|
vecModelDescGroupsPtr*& pVecGroups,
|
|
|
|
|
QString sFile);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 加载
|
|
|
|
|
static bool parseInfos(QDomElement& root, QString sKey, \
|
|
|
|
|
vecModelInfoBasesPtr* pVec, int nOption);
|
|
|
|
|
static bool parseInfoExs(QDomElement& root, QString sKey, \
|
|
|
|
|
vecModelDescGroupsPtr* pVec);
|
|
|
|
|
static bool parseInfoParas(QDomElement& root, QString sKey, \
|
|
|
|
|
QMap<QString, QString>& mapParas);
|
|
|
|
|
|
|
|
|
|
// 关联Group中Desc的信息
|
|
|
|
|
static bool bindModelInfos(vecModelDescGroupsPtr* pVecGroups,
|
|
|
|
|
vecModelInfoBasesPtr* pVecWbs,
|
|
|
|
|
vecModelInfoBasesPtr* pVecWel,
|
|
|
|
|
vecModelInfoBasesPtr* pVecRes,
|
|
|
|
|
vecModelInfoBasesPtr* pVecBdy);
|
|
|
|
|
|
|
|
|
|
};
|