OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ESM::ESMWriter Class Reference

#include <esmwriter.hpp>

Collaboration diagram for ESM::ESMWriter:

Classes

struct  RecordData
 

Public Member Functions

 ESMWriter ()
 
unsigned int getVersion () const
 
void setVersion (unsigned int ver=0x3fa66666)
 
void setType (int type)
 
void setEncoder (ToUTF8::Utf8Encoder *encoding)
 
void setAuthor (const std::string &author)
 
void setDescription (const std::string &desc)
 
void setRecordCount (int count)
 
int getRecordCount ()
 
void setFormat (int format)
 
void clearMaster ()
 
void addMaster (const std::string &name, uint64_t size)
 
void save (std::ostream &file)
 Start saving a file by writing the TES3 header. More...
 
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 startRecord (uint32_t name, uint32_t flags=0)
 
void startSubRecord (const std::string &name)
 
void endRecord (const std::string &name)
 
void endRecord (uint32_t name)
 
void writeFixedSizeString (const std::string &data, int size)
 
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 Member Functions

void writeHNT (const std::string &name, std::string data)
 
void writeT (const std::string &data)
 

Private Attributes

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

Constructor & Destructor Documentation

ESM::ESMWriter::ESMWriter ( )

Member Function Documentation

void ESM::ESMWriter::addMaster ( const std::string &  name,
uint64_t  size 
)

Here is the caller graph for this function:

void ESM::ESMWriter::clearMaster ( )
void ESM::ESMWriter::close ( )
Note
Does not close the stream.

Here is the caller graph for this function:

void ESM::ESMWriter::endRecord ( const std::string &  name)

Here is the call graph for this function:

void ESM::ESMWriter::endRecord ( uint32_t  name)
Todo:
make endianess agnostic

Here is the call graph for this function:

int ESM::ESMWriter::getRecordCount ( )
inline

Here is the caller graph for this function:

unsigned int ESM::ESMWriter::getVersion ( ) const

Here is the caller graph for this function:

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

Start saving a file by writing the TES3 header.

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::setAuthor ( const std::string &  author)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::setDescription ( const std::string &  desc)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::setEncoder ( ToUTF8::Utf8Encoder encoding)

Here is the caller graph for this function:

void ESM::ESMWriter::setFormat ( int  format)

Here is the caller graph for this function:

void ESM::ESMWriter::setRecordCount ( int  count)

Here is the caller graph for this function:

void ESM::ESMWriter::setType ( int  type)

Here is the caller graph for this function:

void ESM::ESMWriter::setVersion ( unsigned int  ver = 0x3fa66666)

Here is the caller graph for this function:

void ESM::ESMWriter::startRecord ( const std::string &  name,
uint32_t  flags = 0 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::startRecord ( uint32_t  name,
uint32_t  flags = 0 
)
Todo:
make endianess agnostic

Here is the call graph for this function:

void ESM::ESMWriter::startSubRecord ( const std::string &  name)
Note
Sub-record hierarchies are not properly supported in ESMReader. This should be fixed later.

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::write ( const char *  data,
size_t  size 
)

Here is the caller graph for this function:

void ESM::ESMWriter::writeFixedSizeString ( const std::string &  data,
int  size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHCString ( const std::string &  data)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHNCString ( const std::string &  name,
const std::string &  data 
)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHNOCString ( const std::string &  name,
const std::string &  data 
)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHNOString ( const std::string &  name,
const std::string &  data 
)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHNString ( const std::string &  name,
const std::string &  data 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeHNString ( const std::string &  name,
const std::string &  data,
size_t  size 
)

Here is the call graph for this function:

template<typename T >
void ESM::ESMWriter::writeHNT ( const std::string &  name,
const T &  data 
)
inline

Here is the call graph for this function:

void ESM::ESMWriter::writeHNT ( const std::string &  name,
std::string  data 
)
inlineprivate
template<typename T >
void ESM::ESMWriter::writeHNT ( const std::string &  name,
const T &  data,
int  size 
)
inline

Here is the call graph for this function:

void ESM::ESMWriter::writeHString ( const std::string &  data)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeName ( const std::string &  data)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::ESMWriter::writeT ( const std::string &  data)
inlineprivate

Here is the caller graph for this function:

template<typename T >
void ESM::ESMWriter::writeT ( const T &  data)
inline

Here is the call graph for this function:

template<typename T >
void ESM::ESMWriter::writeT ( const T &  data,
size_t  size 
)
inline

Here is the call graph for this function:

Member Data Documentation

bool ESM::ESMWriter::mCounting
private
ToUTF8::Utf8Encoder* ESM::ESMWriter::mEncoder
private
Header ESM::ESMWriter::mHeader
private
std::streampos ESM::ESMWriter::mHeaderPos
private
int ESM::ESMWriter::mRecordCount
private
std::list<RecordData> ESM::ESMWriter::mRecords
private
std::ostream* ESM::ESMWriter::mStream
private

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