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 Referencefinal

#include <niffile.hpp>

Inheritance diagram for Nif::NIFFile:
Collaboration diagram for Nif::NIFFile:

Public Member Functions

void fail (const std::string &msg) const override
 Used if file parsing fails. More...
 
void warn (const std::string &msg) const override
 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 override
 Get a given record. More...
 
size_t numRecords () const override
 Number of records. More...
 
RecordgetRoot (size_t index=0) const override
 Get a given root. More...
 
size_t numRoots () const override
 Number of roots. More...
 
void setUseSkinning (bool skinning) override
 
bool getUseSkinning () const override
 
std::string getFilename () const override
 Get the name of the file. More...
 
- Public Member Functions inherited from Nif::File
virtual ~File ()=default
 

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
inlineoverridevirtual

Used if file parsing fails.

Implements Nif::File.

Here is the caller graph for this function:

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

Get the name of the file.

Implements Nif::File.

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

Get a given record.

Implements Nif::File.

Here is the caller graph for this function:

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

Get a given root.

Implements Nif::File.

bool Nif::NIFFile::getUseSkinning ( ) const
overridevirtual

Implements Nif::File.

size_t Nif::NIFFile::numRecords ( ) const
inlineoverridevirtual

Number of records.

Implements Nif::File.

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

Number of roots.

Implements Nif::File.

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)
overridevirtual

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.

Implements Nif::File.

Here is the caller graph for this function:

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

Used when something goes wrong, but not catastrophically so.

Implements Nif::File.

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: