OpenMW
Classes | Public Member Functions | Private Attributes
ESM::ESMWriter Class Reference

#include <esmwriter.hpp>

List of all members.

Classes

struct  RecordData

Public Member Functions

 ESMWriter ()
unsigned int getVersion () const
void setVersion (unsigned int ver=0x3fa66666)
void setEncoder (ToUTF8::Utf8Encoder *encoding)
void setAuthor (const std::string &author)
void setDescription (const std::string &desc)
void setRecordCount (int count)
void setFormat (int format)
void clearMaster ()
void addMaster (const std::string &name, uint64_t size)
void save (const std::string &file)
 Start saving a file by writing the TES3 header.
void save (std::ostream &file)
 Start saving a file by writing the TES3 header.
void close ()
void writeHNString (const std::string &name, const std::string &data)
void writeHNString (const std::string &name, const std::string &data, size_t size)
void writeHNCString (const std::string &name, const std::string &data)
void writeHNOString (const std::string &name, const std::string &data)
void writeHNOCString (const std::string &name, const std::string &data)
template<typename T >
void writeHNT (const std::string &name, const T &data)
template<typename T >
void writeHNT (const std::string &name, const T &data, int size)
template<typename T >
void writeT (const T &data)
template<typename T >
void writeT (const T &data, size_t size)
void startRecord (const std::string &name, uint32_t flags=0)
void startSubRecord (const std::string &name)
void endRecord (const std::string &name)
void writeHString (const std::string &data)
void writeHCString (const std::string &data)
void writeName (const std::string &data)
void write (const char *data, size_t size)

Private Attributes

std::list< RecordDatamRecords
std::ostream * mStream
std::streampos mHeaderPos
ToUTF8::Utf8EncodermEncoder
int mRecordCount
bool mCounting
Header mHeader

Constructor & Destructor Documentation


Member Function Documentation

void ESM::ESMWriter::addMaster ( const std::string &  name,
uint64_t  size 
)
Note:
Does not close the stream.
void ESM::ESMWriter::endRecord ( const std::string &  name)
unsigned int ESM::ESMWriter::getVersion ( ) const
void ESM::ESMWriter::save ( const std::string &  file)

Start saving a file by writing the TES3 header.

void ESM::ESMWriter::save ( std::ostream &  file)

Start saving a file by writing the TES3 header.

void ESM::ESMWriter::setAuthor ( const std::string &  author)
void ESM::ESMWriter::setDescription ( const std::string &  desc)
void ESM::ESMWriter::setFormat ( int  format)
void ESM::ESMWriter::setRecordCount ( int  count)
void ESM::ESMWriter::setVersion ( unsigned int  ver = 0x3fa66666)
void ESM::ESMWriter::startRecord ( const std::string &  name,
uint32_t  flags = 0 
)
void ESM::ESMWriter::startSubRecord ( const std::string &  name)
void ESM::ESMWriter::write ( const char *  data,
size_t  size 
)
void ESM::ESMWriter::writeHCString ( const std::string &  data)
void ESM::ESMWriter::writeHNCString ( const std::string &  name,
const std::string &  data 
) [inline]
void ESM::ESMWriter::writeHNOCString ( const std::string &  name,
const std::string &  data 
) [inline]
void ESM::ESMWriter::writeHNOString ( const std::string &  name,
const std::string &  data 
) [inline]
void ESM::ESMWriter::writeHNString ( const std::string &  name,
const std::string &  data 
)
void ESM::ESMWriter::writeHNString ( const std::string &  name,
const std::string &  data,
size_t  size 
)
template<typename T >
void ESM::ESMWriter::writeHNT ( const std::string &  name,
const T &  data 
) [inline]
template<typename T >
void ESM::ESMWriter::writeHNT ( const std::string &  name,
const T &  data,
int  size 
) [inline]
void ESM::ESMWriter::writeHString ( const std::string &  data)
void ESM::ESMWriter::writeName ( const std::string &  data)
template<typename T >
void ESM::ESMWriter::writeT ( const T &  data) [inline]
template<typename T >
void ESM::ESMWriter::writeT ( const T &  data,
size_t  size 
) [inline]

Member Data Documentation

bool ESM::ESMWriter::mCounting [private]
std::streampos ESM::ESMWriter::mHeaderPos [private]
std::ostream* ESM::ESMWriter::mStream [private]

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