xoreos
0.0.5
|
#include <erfwriter.h>
Public Types | |
enum | Version { kERFVersion10 } |
Public Member Functions | |
ERFWriter (uint32 id, uint32 fileCount, Common::SeekableWriteStream &stream, Version version=kERFVersion10, LocString description=LocString()) | |
Create an ERF writer by writing the header to the stream and reserve fileCount places in the key and resource table. More... | |
~ERFWriter () | |
void | add (const Common::UString &resRef, FileType resType, Common::ReadStream &stream) |
Add a new stream to this archive to be packed. More... | |
Private Attributes | |
Common::SeekableWriteStream & | _stream |
uint32 | _currentFileCount |
uint32 | _fileCount |
uint32 | _offsetToResourceData |
uint32 | _keyTableOffset |
uint32 | _resourceTableOffset |
Definition at line 35 of file erfwriter.h.
Enumerator | |
---|---|
kERFVersion10 |
Definition at line 37 of file erfwriter.h.
Aurora::ERFWriter::ERFWriter | ( | uint32 | id, |
uint32 | fileCount, | ||
Common::SeekableWriteStream & | stream, | ||
Version | version = kERFVersion10 , |
||
LocString | description = LocString() |
||
) |
Create an ERF writer by writing the header to the stream and reserve fileCount places in the key and resource table.
id | The FourCC for the archive. |
fileCount | The number of files which should be contained in the archive. |
stream | The write stream in which the archive should be written. |
version | The ERF version to write |
description | The LocString, that should be used for the description. |
Definition at line 33 of file erfwriter.cpp.
References _fileCount, _keyTableOffset, _offsetToResourceData, _resourceTableOffset, Aurora::LocString::getID(), Aurora::LocString::getNumStrings(), Aurora::LocString::getWrittenSize(), kERFVersion10, Aurora::kVersion10, Aurora::LocString::writeLocString(), Common::WriteStream::writeUint32BE(), Common::WriteStream::writeUint32LE(), and Common::WriteStream::writeZeros().
Aurora::ERFWriter::~ERFWriter | ( | ) |
Definition at line 85 of file erfwriter.cpp.
void Aurora::ERFWriter::add | ( | const Common::UString & | resRef, |
FileType | resType, | ||
Common::ReadStream & | stream | ||
) |
Add a new stream to this archive to be packed.
Definition at line 88 of file erfwriter.cpp.
References _currentFileCount, _fileCount, _keyTableOffset, _offsetToResourceData, _resourceTableOffset, _stream, Common::UString::c_str(), Aurora::kFileTypeMAXArchive, Aurora::kFileTypeNone, Aurora::kFileTypeRES, Common::SeekableWriteStream::seek(), Common::UString::size(), Common::WriteStream::write(), Common::WriteStream::writeStream(), Common::WriteStream::writeUint16LE(), Common::WriteStream::writeUint32LE(), and Common::WriteStream::writeZeros().
|
private |
Definition at line 62 of file erfwriter.h.
Referenced by add().
|
private |
Definition at line 63 of file erfwriter.h.
Referenced by add(), and ERFWriter().
|
private |
Definition at line 65 of file erfwriter.h.
Referenced by add(), and ERFWriter().
|
private |
Definition at line 64 of file erfwriter.h.
Referenced by add(), and ERFWriter().
|
private |
Definition at line 66 of file erfwriter.h.
Referenced by add(), and ERFWriter().
|
private |
Definition at line 60 of file erfwriter.h.
Referenced by add().