45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include "xml/tinyxml2.h"
|
|
|
|
class WorkSpace;
|
|
|
|
class WorkSpaceXMLParse : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit WorkSpaceXMLParse(WorkSpace* workspace, QObject* parent = nullptr) noexcept;
|
|
~WorkSpaceXMLParse() override = default;
|
|
|
|
inline const QString& GetName() const {
|
|
return name_;
|
|
}
|
|
// static WorkSpace* Create(const QString& name);
|
|
inline void SetDescribe(const QString& describe) {
|
|
describe_ = describe;
|
|
}
|
|
inline const QString& GetDescribe() const {
|
|
return describe_;
|
|
}
|
|
|
|
bool Load(const QString& dyt);
|
|
bool Save(const QString& path);
|
|
|
|
private:
|
|
bool ParseScene(const tinyxml2::XMLElement* element);
|
|
bool ParseTimestep(const tinyxml2::XMLElement* element);
|
|
bool ParseLamp(const tinyxml2::XMLElement* element);
|
|
bool ParseEntities(const tinyxml2::XMLElement* element);
|
|
bool ParseChart(const tinyxml2::XMLElement* element);
|
|
bool ParseReport(const tinyxml2::XMLElement* element);
|
|
|
|
private:
|
|
QString name_;
|
|
QString describe_;
|
|
QString path_;
|
|
|
|
WorkSpace* workSpace_;
|
|
|
|
}; |