OpenMW
|
#include <esmreader.hpp>
Public Member Functions | |
ESMReader () | |
int | getVer () const |
float | getFVer () const |
const std::string | getAuthor () const |
const std::string | getDesc () const |
const std::vector < Header::MasterData > & | getGameFiles () const |
int | getFormat () const |
const NAME & | retSubName () const |
uint32_t | getSubSize () const |
ESM_Context | getContext () |
void | restoreContext (const ESM_Context &rc) |
void | close () |
void | openRaw (Ogre::DataStreamPtr _esm, const std::string &name) |
void | open (Ogre::DataStreamPtr _esm, const std::string &name) |
void | open (const std::string &file) |
void | openRaw (const std::string &file) |
size_t | getFileSize () |
Get the file size. Make sure that the file has been opened! | |
size_t | getFileOffset () |
Get the current position in the file. Make sure that the file has been opened! | |
void | setIndex (const int index) |
const int | getIndex () |
void | setGlobalReaderList (std::vector< ESMReader > *list) |
std::vector< ESMReader > * | getGlobalReaderList () |
template<typename X > | |
void | getHNT (X &x, const char *name) |
template<typename X > | |
void | getHNOT (X &x, const char *name) |
template<typename X > | |
void | getHNT (X &x, const char *name, int size) |
template<typename X > | |
void | getHNOT (X &x, const char *name, int size) |
int64_t | getHNLong (const char *name) |
template<typename X > | |
void | getHT (X &x) |
template<typename X > | |
void | getHT (X &x, int size) |
std::string | getHNOString (const char *name) |
std::string | getHNString (const char *name) |
std::string | getHString () |
void | getHExact (void *p, int size) |
void | getHNExact (void *p, int size, const char *name) |
void | getSubNameIs (const char *name) |
bool | isNextSub (const char *name) |
void | getSubName () |
bool | isEmptyOrGetName () |
void | skipHSub () |
void | skipHSubSize (int size) |
void | getSubHeader () |
void | getSubHeaderIs (int size) |
NAME | getRecName () |
void | skipRecord () |
void | skipHRecord () |
void | getRecHeader () |
void | getRecHeader (uint32_t &flags) |
bool | hasMoreRecs () const |
bool | hasMoreSubs () const |
template<typename X > | |
void | getT (X &x) |
void | getExact (void *x, int size) |
void | getName (NAME &name) |
void | getUint (uint32_t &u) |
std::string | getString (int size) |
void | skip (int bytes) |
uint64_t | getOffset () |
void | fail (const std::string &msg) |
Used for error handling. | |
void | setEncoder (ToUTF8::Utf8Encoder *encoder) |
Sets font encoder for ESM strings. | |
unsigned int | getRecordFlags () |
Get record flags of last record. | |
Public Attributes | |
int | mIdx |
Private Attributes | |
Ogre::DataStreamPtr | mEsm |
ESM_Context | mCtx |
unsigned int | mRecordFlags |
std::vector< char > | mBuffer |
Header | mHeader |
std::vector< ESMReader > * | mGlobalReaderList |
ToUTF8::Utf8Encoder * | mEncoder |
void ESM::ESMReader::close | ( | ) |
Close the file, resets all information. After calling close() the structure may be reused to load a new file.
void ESM::ESMReader::fail | ( | const std::string & | msg | ) |
Used for error handling.
const std::string ESM::ESMReader::getAuthor | ( | ) | const [inline] |
Save the current file position and information in a ESM_Context struct
const std::string ESM::ESMReader::getDesc | ( | ) | const [inline] |
void ESM::ESMReader::getExact | ( | void * | x, |
int | size | ||
) |
size_t ESM::ESMReader::getFileOffset | ( | ) | [inline] |
Get the current position in the file. Make sure that the file has been opened!
size_t ESM::ESMReader::getFileSize | ( | ) | [inline] |
Get the file size. Make sure that the file has been opened!
int ESM::ESMReader::getFormat | ( | ) | const |
float ESM::ESMReader::getFVer | ( | ) | const [inline] |
const std::vector<Header::MasterData>& ESM::ESMReader::getGameFiles | ( | ) | const [inline] |
std::vector<ESMReader>* ESM::ESMReader::getGlobalReaderList | ( | ) | [inline] |
void ESM::ESMReader::getHExact | ( | void * | p, |
int | size | ||
) |
void ESM::ESMReader::getHNExact | ( | void * | p, |
int | size, | ||
const char * | name | ||
) |
int64_t ESM::ESMReader::getHNLong | ( | const char * | name | ) |
std::string ESM::ESMReader::getHNOString | ( | const char * | name | ) |
void ESM::ESMReader::getHNOT | ( | X & | x, |
const char * | name | ||
) | [inline] |
void ESM::ESMReader::getHNOT | ( | X & | x, |
const char * | name, | ||
int | size | ||
) | [inline] |
std::string ESM::ESMReader::getHNString | ( | const char * | name | ) |
void ESM::ESMReader::getHNT | ( | X & | x, |
const char * | name | ||
) | [inline] |
void ESM::ESMReader::getHNT | ( | X & | x, |
const char * | name, | ||
int | size | ||
) | [inline] |
std::string ESM::ESMReader::getHString | ( | ) |
void ESM::ESMReader::getHT | ( | X & | x | ) | [inline] |
void ESM::ESMReader::getHT | ( | X & | x, |
int | size | ||
) | [inline] |
const int ESM::ESMReader::getIndex | ( | ) | [inline] |
void ESM::ESMReader::getName | ( | NAME & | name | ) | [inline] |
uint64_t ESM::ESMReader::getOffset | ( | ) | [inline] |
void ESM::ESMReader::getRecHeader | ( | ) | [inline] |
void ESM::ESMReader::getRecHeader | ( | uint32_t & | flags | ) |
unsigned int ESM::ESMReader::getRecordFlags | ( | ) | [inline] |
Get record flags of last record.
std::string ESM::ESMReader::getString | ( | int | size | ) |
void ESM::ESMReader::getSubHeader | ( | ) |
void ESM::ESMReader::getSubHeaderIs | ( | int | size | ) |
Get sub header and check the size
void ESM::ESMReader::getSubName | ( | ) |
void ESM::ESMReader::getSubNameIs | ( | const char * | name | ) |
uint32_t ESM::ESMReader::getSubSize | ( | ) | const [inline] |
void ESM::ESMReader::getT | ( | X & | x | ) | [inline] |
void ESM::ESMReader::getUint | ( | uint32_t & | u | ) | [inline] |
int ESM::ESMReader::getVer | ( | ) | const [inline] |
bool ESM::ESMReader::hasMoreRecs | ( | ) | const [inline] |
bool ESM::ESMReader::hasMoreSubs | ( | ) | const [inline] |
bool ESM::ESMReader::isEmptyOrGetName | ( | ) |
bool ESM::ESMReader::isNextSub | ( | const char * | name | ) |
Checks if the next sub record name matches the parameter. If it does, it is read into 'subName' just as if getSubName() was called. If not, the read name will still be available for future calls to getSubName(), isNextSub() and getSubNameIs().
void ESM::ESMReader::open | ( | Ogre::DataStreamPtr | _esm, |
const std::string & | name | ||
) |
Load ES file from a new stream, parses the header. Closes the currently open file first, if any.
void ESM::ESMReader::open | ( | const std::string & | file | ) |
void ESM::ESMReader::openRaw | ( | Ogre::DataStreamPtr | _esm, |
const std::string & | name | ||
) |
Raw opening. Opens the file and sets everything up but doesn't parse the header.
void ESM::ESMReader::openRaw | ( | const std::string & | file | ) |
void ESM::ESMReader::restoreContext | ( | const ESM_Context & | rc | ) |
Restore a previously saved context
const NAME& ESM::ESMReader::retSubName | ( | ) | const [inline] |
void ESM::ESMReader::setEncoder | ( | ToUTF8::Utf8Encoder * | encoder | ) |
Sets font encoder for ESM strings.
void ESM::ESMReader::setGlobalReaderList | ( | std::vector< ESMReader > * | list | ) | [inline] |
void ESM::ESMReader::setIndex | ( | const int | index | ) | [inline] |
void ESM::ESMReader::skip | ( | int | bytes | ) | [inline] |
void ESM::ESMReader::skipHRecord | ( | ) |
void ESM::ESMReader::skipHSub | ( | ) |
void ESM::ESMReader::skipHSubSize | ( | int | size | ) |
void ESM::ESMReader::skipRecord | ( | ) |
std::vector<char> ESM::ESMReader::mBuffer [private] |
ESM_Context ESM::ESMReader::mCtx [private] |
ToUTF8::Utf8Encoder* ESM::ESMReader::mEncoder [private] |
Ogre::DataStreamPtr ESM::ESMReader::mEsm [private] |
std::vector<ESMReader>* ESM::ESMReader::mGlobalReaderList [private] |
Header ESM::ESMReader::mHeader [private] |
unsigned int ESM::ESMReader::mRecordFlags [private] |