XPlor/libs/xassets/xasset.h
njohnson 99d2885f9c Fix: Replace QDataStream with XDataStream
This commit replaces the use of `QDataStream` with `XDataStream` in the `XAsset` class. This aligns the code with the current XAssets framework and promotes consistency.
2025-09-10 21:56:08 -04:00

45 lines
846 B
C++

#ifndef XASSET_H
#define XASSET_H
#include "xassettype.h"
#include "xdatastream.h"
#include <QString>
#include <QDebug>
#include <QIODevice>
class XAsset
{
public:
XAsset();
virtual ~XAsset() = default;
void SetPtr(qint32 aPtr);
qint32 GetPtr() const;
void SetType(XAssetType aType);
XAssetType GetType() const;
void SetName(QString aName);
QString GetName() const;
static void SetDebug(bool aDebug);
bool IsDebug() const;
virtual void Clear();
virtual void ParsePtr(XDataStream *aStream, bool aDataFlag = true);
virtual void ParseData(XDataStream *aStream) = 0;
static XAsset* Create(XAssetType aAssetType);
static QString XAssetTypeToString(XAssetType type);
static bool mDebug;
private:
qint32 mPtr;
XAssetType mType;
QString mName;
};
#endif // XASSET_H