xoreos  0.0.5
Public Types | Public Member Functions | Private Attributes | List of all members
Aurora::ERFWriter Class Reference

#include <erfwriter.h>

Collaboration diagram for Aurora::ERFWriter:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 35 of file erfwriter.h.

Member Enumeration Documentation

◆ Version

Enumerator
kERFVersion10 

Definition at line 37 of file erfwriter.h.

Constructor & Destructor Documentation

◆ ERFWriter()

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.

Parameters
idThe FourCC for the archive.
fileCountThe number of files which should be contained in the archive.
streamThe write stream in which the archive should be written.
versionThe ERF version to write
descriptionThe 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().

Here is the call graph for this function:

◆ ~ERFWriter()

Aurora::ERFWriter::~ERFWriter ( )

Definition at line 85 of file erfwriter.cpp.

Member Function Documentation

◆ add()

void Aurora::ERFWriter::add ( const Common::UString resRef,
FileType  resType,
Common::ReadStream stream 
)

Member Data Documentation

◆ _currentFileCount

uint32 Aurora::ERFWriter::_currentFileCount
private

Definition at line 62 of file erfwriter.h.

Referenced by add().

◆ _fileCount

uint32 Aurora::ERFWriter::_fileCount
private

Definition at line 63 of file erfwriter.h.

Referenced by add(), and ERFWriter().

◆ _keyTableOffset

uint32 Aurora::ERFWriter::_keyTableOffset
private

Definition at line 65 of file erfwriter.h.

Referenced by add(), and ERFWriter().

◆ _offsetToResourceData

uint32 Aurora::ERFWriter::_offsetToResourceData
private

Definition at line 64 of file erfwriter.h.

Referenced by add(), and ERFWriter().

◆ _resourceTableOffset

uint32 Aurora::ERFWriter::_resourceTableOffset
private

Definition at line 66 of file erfwriter.h.

Referenced by add(), and ERFWriter().

◆ _stream

Common::SeekableWriteStream& Aurora::ERFWriter::_stream
private

Definition at line 60 of file erfwriter.h.

Referenced by add().


The documentation for this class was generated from the following files: