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

#include <niffile.hpp>

Collaboration diagram for Nif::NIFFile:

Public Member Functions

void fail (const std::string &msg) const
 Used if file parsing fails. More...
 
void warn (const std::string &msg) const
 Used when something goes wrong, but not catastrophically so. More...
 
 NIFFile (Files::IStreamPtr stream, const std::string &name)
 Open a NIF stream. The name is used for error messages. More...
 
 ~NIFFile ()
 
RecordgetRecord (size_t index) const
 Get a given record. More...
 
size_t numRecords () const
 Number of records. More...
 
RecordgetRoot (size_t index=0) const
 Get a given root. More...
 
size_t numRoots () const
 Number of roots. More...
 
void setUseSkinning (bool skinning)
 
bool getUseSkinning () const
 
std::string getFilename () const
 Get the name of the file. More...
 

Private Types

enum  NIFVersion { VER_MW = 0x04000002 }
 

Private Member Functions

void parse (Files::IStreamPtr stream)
 Parse the file. More...
 
std::string printVersion (unsigned int version)
 
 NIFFile (NIFFile const &)
 Private Copy Constructor. More...
 
void operator= (NIFFile const &)
 

Private Attributes

unsigned int ver
 Nif file version. More...
 
std::string filename
 File name, used for error messages and opening the file. More...
 
std::vector< Record * > records
 Record list. More...
 
std::vector< Record * > roots
 Root list. This is a select portion of the pointers from records. More...
 
bool mUseSkinning
 

Member Enumeration Documentation

Enumerator
VER_MW 

Constructor & Destructor Documentation

Nif::NIFFile::NIFFile ( NIFFile const &  )
private

Private Copy Constructor.

Nif::NIFFile::NIFFile ( Files::IStreamPtr  stream,
const std::string &  name 
)

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

Here is the call graph for this function:

Nif::NIFFile::~NIFFile ( )

Member Function Documentation

void Nif::NIFFile::fail ( const std::string &  msg) const
inline

Used if file parsing fails.

Here is the caller graph for this function:

std::string Nif::NIFFile::getFilename ( ) const
inline

Get the name of the file.

Record* Nif::NIFFile::getRecord ( size_t  index) const
inline

Get a given record.

Here is the caller graph for this function:

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

Get a given root.

bool Nif::NIFFile::getUseSkinning ( ) const
size_t Nif::NIFFile::numRecords ( ) const
inline

Number of records.

size_t Nif::NIFFile::numRoots ( ) const
inline

Number of roots.

void Nif::NIFFile::operator= ( NIFFile const &  )
private

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void Nif::NIFFile::parse ( Files::IStreamPtr  stream)
private

Parse the file.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Nif::NIFFile::printVersion ( unsigned int  version)
private

Get the file's version in a human readable form

Returns
A string containing a human readable NIF version number

Here is the caller graph for this function:

void Nif::NIFFile::setUseSkinning ( bool  skinning)

Set whether there is skinning contained in this NIF file.

Note
This is just a hint for users of the NIF file and has no effect on the loading procedure.

Here is the caller graph for this function:

void Nif::NIFFile::warn ( const std::string &  msg) const
inline

Used when something goes wrong, but not catastrophically so.

Here is the caller graph for this function:

Member Data Documentation

std::string Nif::NIFFile::filename
private

File name, used for error messages and opening the file.

bool Nif::NIFFile::mUseSkinning
private
std::vector<Record*> Nif::NIFFile::records
private

Record list.

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

Root list. This is a select portion of the pointers from records.

unsigned int Nif::NIFFile::ver
private

Nif file version.


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