OpenMW
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
Nif::NIFFile Class Reference

#include <niffile.hpp>

List of all members.

Classes

struct  CacheLock
class  LoadedCache
struct  psudo_private_modifier

Public Types

typedef boost::shared_ptr
< NIFFile
ptr

Public Member Functions

void fail (const std::string &msg)
 Used for error handling.
void warn (const std::string &msg)
 NIFFile (const std::string &name, psudo_private_modifier)
 Open a NIF stream. The name is used for error messages.
 ~NIFFile ()
RecordgetRecord (size_t index)
 Get a given record.
size_t numRecords ()
 Number of records.
RecordgetRoot (size_t index=0)
 Get a given root.
size_t numRoots ()
 Number of roots.

Static Public Member Functions

static ptr create (const std::string &name)
static void lockCache ()
static void unlockCache ()

Private Types

enum  NIFVersion { VER_MW = 0x04000002 }

Private Member Functions

void parse ()
 Parse the file.
 NIFFile (NIFFile const &)
void operator= (NIFFile const &)

Private Attributes

int ver
 Nif file version.
std::string filename
 File name, used for error messages.
std::vector< Record * > records
 Record list.
std::vector< Record * > roots
 Root list.

Friends

class LoadedCache

Member Typedef Documentation

typedef boost::shared_ptr<NIFFile> Nif::NIFFile::ptr

Member Enumeration Documentation

enum Nif::NIFFile::NIFVersion [private]
Enumerator:
VER_MW 

Constructor & Destructor Documentation

Nif::NIFFile::NIFFile ( NIFFile const &  ) [private]
Nif::NIFFile::NIFFile ( const std::string &  name,
psudo_private_modifier   
)

Open a NIF stream. The name is used for error messages.


Member Function Documentation

NIFFile::ptr Nif::NIFFile::create ( const std::string &  name) [static]
void Nif::NIFFile::fail ( const std::string &  msg) [inline]

Used for error handling.

Record* Nif::NIFFile::getRecord ( size_t  index) [inline]

Get a given record.

Record* Nif::NIFFile::getRoot ( size_t  index = 0) [inline]

Get a given root.

void Nif::NIFFile::lockCache ( ) [static]
size_t Nif::NIFFile::numRecords ( ) [inline]

Number of records.

size_t Nif::NIFFile::numRoots ( ) [inline]

Number of roots.

void Nif::NIFFile::operator= ( NIFFile const &  ) [private]
void Nif::NIFFile::parse ( ) [private]

Parse the file.

void Nif::NIFFile::unlockCache ( ) [static]
void Nif::NIFFile::warn ( const std::string &  msg) [inline]

Friends And Related Function Documentation

friend class LoadedCache [friend]

Member Data Documentation

std::string Nif::NIFFile::filename [private]

File name, used for error messages.

std::vector<Record*> Nif::NIFFile::records [private]

Record list.

std::vector<Record*> Nif::NIFFile::roots [private]

Root list.

int Nif::NIFFile::ver [private]

Nif file version.


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