metaforce/DataSpec/DNACommon/DNACommon.hpp

61 lines
1.3 KiB
C++
Raw Normal View History

2015-06-24 20:56:23 +00:00
#ifndef __DNA_COMMON_HPP__
#define __DNA_COMMON_HPP__
#include <Athena/DNA.hpp>
#include <CFourCC.hpp>
#include <CUniqueID.hpp>
2015-07-01 23:50:39 +00:00
namespace Retro
{
2015-06-24 20:56:23 +00:00
/* This comes up a great deal */
typedef Athena::io::DNA<Athena::BigEndian> BigDNA;
/* FourCC DNA */
class DNAFourCC : public BigDNA, public CFourCC
{
public:
Delete expl;
void read(Athena::io::IStreamReader& reader)
{_read(reader);}
void write(Athena::io::IStreamWriter& writer) const
{_write(writer);}
};
/* PAK 32-bit Unique ID DNA */
class DNAUniqueID32 : public BigDNA, public CUniqueID
{
public:
Delete expl;
void read(Athena::io::IStreamReader& reader)
{_read(reader, E_32Bits);}
void write(Athena::io::IStreamWriter& writer) const
{_write(writer);}
};
/* PAK 64-bit Unique ID DNA */
class DNAUniqueID64 : public BigDNA, public CUniqueID
{
public:
Delete expl;
void read(Athena::io::IStreamReader& reader)
{_read(reader, E_64Bits);}
void write(Athena::io::IStreamWriter& writer) const
{_write(writer);}
};
/* PAK 128-bit Unique ID DNA */
class DNAUniqueID128 : public BigDNA, public CUniqueID
{
public:
Delete expl;
void read(Athena::io::IStreamReader& reader)
{_read(reader, E_128Bits);}
void write(Athena::io::IStreamWriter& writer) const
{_write(writer);}
};
2015-07-01 23:50:39 +00:00
}
2015-06-24 20:56:23 +00:00
#endif // __DNA_COMMON_HPP__