XPlor/libs/xassets/xasset.h

45 lines
846 B
C
Raw Normal View History

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"
#include "xdatastream.h"
2025-09-05 18:35:17 -04:00
#include <QString>
2025-09-07 12:36:08 -04:00
#include <QDebug>
#include <QIODevice>
2025-08-14 17:30:25 -04:00
class XAsset
{
public:
XAsset();
virtual ~XAsset() = default;
2025-08-14 17:30:25 -04:00
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
2025-09-07 12:36:08 -04:00
static void SetDebug(bool aDebug);
bool IsDebug() const;
2025-08-14 17:30:25 -04:00
virtual void Clear();
virtual void ParsePtr(XDataStream *aStream, bool aDataFlag = true);
virtual void ParseData(XDataStream *aStream) = 0;
2025-08-14 17:30:25 -04:00
2025-09-05 18:35:17 -04:00
static XAsset* Create(XAssetType aAssetType);
static QString XAssetTypeToString(XAssetType type);
2025-09-07 12:36:08 -04:00
static bool mDebug;
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