2024-02-05 22:25:30 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ehs/EHS.h"
|
|
|
|
#include "ehs/Str.h"
|
|
|
|
#include "ehs/Vector.h"
|
|
|
|
#include "ehs/Serializer.h"
|
|
|
|
#include "RIFF_Chunk.h"
|
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
2024-07-24 01:36:20 -07:00
|
|
|
class EHS_LIB_IO RIFF
|
2024-02-05 22:25:30 -08:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
Str_8 type;
|
|
|
|
Vector<RIFF_Chunk> chunks;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RIFF() = default;
|
|
|
|
|
|
|
|
RIFF(const Str_8& filePath);
|
|
|
|
|
|
|
|
RIFF(Serializer<>& data);
|
|
|
|
|
|
|
|
RIFF(const RIFF& riff) = default;
|
|
|
|
|
|
|
|
operator const RIFF_Chunk*() const;
|
|
|
|
|
|
|
|
Str_8 GetType() const;
|
|
|
|
|
|
|
|
bool HasChunk(const UInt_64 hashId) const;
|
|
|
|
|
|
|
|
bool HasChunk(const Str_8& id) const;
|
|
|
|
|
|
|
|
RIFF_Chunk GetChunk(const UInt_64 hashId) const;
|
|
|
|
|
|
|
|
RIFF_Chunk GetChunk(const Str_8& id) const;
|
|
|
|
};
|
|
|
|
}
|