XPlor/libs/xassets/xassetlist.h

43 lines
922 B
C
Raw Normal View History

2025-08-17 13:14:17 -04:00
#ifndef XASSETLIST_H
#define XASSETLIST_H
2025-09-05 18:35:17 -04:00
#include "xassetheader.h"
#include "xscriptstringlist.h"
2025-08-17 13:14:17 -04:00
#include "xasset.h"
2025-08-17 13:14:17 -04:00
#include <QVector>
2025-09-05 18:35:17 -04:00
class ZoneFile;
2025-08-17 13:14:17 -04:00
class XAssetList : public XAsset
{
public:
explicit XAssetList();
2025-09-05 18:35:17 -04:00
XAssetList(ZoneFile* aZoneFile);
~XAssetList();
2025-08-17 13:14:17 -04:00
void ParseData(QDataStream *aStream) override;
2025-09-05 18:35:17 -04:00
void Clear() override;
2025-08-17 13:14:17 -04:00
XScriptStringList GetStringList() const;
void SetStringList(const XScriptStringList& stringList);
2025-08-17 13:14:17 -04:00
2025-09-05 18:35:17 -04:00
QVector<XAsset*> GetAssets() const;
XAsset* GetAsset(size_t aIndex) const;
QVector<XAsset*> GetAssetsByType(XAssetType aAssetType) const;
void SetAssets(QVector<XAsset *> assets);
2025-09-05 18:35:17 -04:00
void AddAsset(XAsset* aAsset);
size_t Size() const;
2025-08-17 13:14:17 -04:00
private:
XScriptStringList mStringList;
2025-09-05 18:35:17 -04:00
quint32 mAssetCount;
QVector<XAsset*> mAssets;
2025-09-05 18:35:17 -04:00
QVector<XAssetHeader> mAssetHeaders;
ZoneFile* mZoneFile;
2025-08-17 13:14:17 -04:00
};
#endif // XASSETLIST_H