You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/nmNum/nmXml/nmXmlData.h

46 lines
1.1 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Defines.h"
#include "iXmlItemBase.h"
#include "nmXml_global.h"
// xml节点对应的数据对象
class NM_XML_EXPORT nmXmlData : public iXmlItemBase
{
public:
nmXmlData();
~nmXmlData();
// 示例把xml某属性转为枚举
enum nmUseMode
{
NUM_Common = 0, //枚举1
NUM_Advanced, //枚举2
NUM_Others, //其他
NUM_Unknown
};
// 解析xml节点到List
virtual void parseInfo(const QDomElement& e);
// 把List分配到成员变量
// 输入开始的m_listValues中index并且返回下一个index
virtual int allocateInfo(int nIndex);
protected:
// 初始设置节点信息
virtual void initXmlTags();
public:
//QString m_sName; //名称,父类已经提供
//QString m_sAlias; //别名,父类已经提供
QString m_sTag; // 示例把xml某属性转为QString
QStringList m_listParas;// 示例把xml某属性转为QStringList
nmUseMode m_oNum; // 示例把xml某属性转为枚举
};
typedef QVector<nmXmlData*> vecNmXmlDatas;