2025-08-14 17:30:25 -04:00
|
|
|
#ifndef XASSET_H
|
|
|
|
|
#define XASSET_H
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
#include "xassettype.h"
|
|
|
|
|
|
2025-09-03 13:00:58 -04:00
|
|
|
#include <QDataStream>
|
2025-09-05 18:35:17 -04:00
|
|
|
#include <QString>
|
2025-08-14 17:30:25 -04:00
|
|
|
|
|
|
|
|
class XAsset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
XAsset();
|
|
|
|
|
virtual ~XAsset();
|
|
|
|
|
|
|
|
|
|
void SetPtr(qint32 aPtr);
|
2025-09-05 18:35:17 -04:00
|
|
|
qint32 GetPtr() const;
|
|
|
|
|
|
|
|
|
|
void SetType(XAssetType aType);
|
|
|
|
|
XAssetType GetType() const;
|
|
|
|
|
|
|
|
|
|
void SetName(QString aName);
|
|
|
|
|
QString GetName() const;
|
2025-08-14 17:30:25 -04:00
|
|
|
|
|
|
|
|
virtual void Clear();
|
|
|
|
|
virtual void ParsePtr(QDataStream *aStream, bool aDataFlag = true);
|
|
|
|
|
virtual void ParseData(QDataStream *aStream) = 0;
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
static XAsset* Create(XAssetType aAssetType);
|
|
|
|
|
static QString XAssetTypeToString(XAssetType type);
|
|
|
|
|
|
2025-08-14 17:30:25 -04:00
|
|
|
private:
|
|
|
|
|
qint32 mPtr;
|
2025-09-05 18:35:17 -04:00
|
|
|
XAssetType mType;
|
|
|
|
|
QString mName;
|
2025-08-14 17:30:25 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // XASSET_H
|