16 lines
386 B
C++
16 lines
386 B
C++
#include <sample/datachnk.hpp>
|
|
|
|
bool DataChunk::read(FileHandle &handle)
|
|
{
|
|
if(!mChunkID.read(handle))return false;
|
|
if(!handle.read((BYTE*)&mLengthData,sizeof(mLengthData)))return false;
|
|
return true;
|
|
}
|
|
|
|
bool DataChunk::write(MemFile &memFile)const
|
|
{
|
|
if(!mChunkID.write(memFile))return false;
|
|
if(!memFile.write((char*)&mLengthData,sizeof(mLengthData)))return false;
|
|
return true;
|
|
}
|