3 #ifndef OPENMW_COMPONENTS_NIF_NIFFILE_HPP
4 #define OPENMW_COMPONENTS_NIF_NIFFILE_HPP
51 void fail(
const std::string &msg)
const
53 std::string err =
" NIFFile Error: " + msg;
55 throw std::runtime_error(err);
58 void warn(
const std::string &msg)
const
60 std::cerr <<
" NIFFile Warning: " << msg <<std::endl
95 typedef boost::shared_ptr<const Nif::NIFFile>
NIFFilePtr;
Definition: niffile.hpp:17
void warn(const std::string &msg) const
Used when something goes wrong, but not catastrophically so.
Definition: niffile.hpp:58
std::string printVersion(unsigned int version)
Definition: niffile.cpp:118
NIFVersion
Definition: niffile.hpp:19
Record * getRoot(size_t index=0) const
Get a given root.
Definition: niffile.hpp:78
Base class for all records.
Definition: record.hpp:100
void setUseSkinning(bool skinning)
Definition: niffile.cpp:215
std::string getFilename() const
Get the name of the file.
Definition: niffile.hpp:93
std::vector< Record * > records
Record list.
Definition: niffile.hpp:30
size_t numRecords() const
Number of records.
Definition: niffile.hpp:75
void fail(const std::string &msg) const
Used if file parsing fails.
Definition: niffile.hpp:51
unsigned int ver
Nif file version.
Definition: niffile.hpp:24
bool mUseSkinning
Definition: niffile.hpp:35
~NIFFile()
Definition: niffile.cpp:19
boost::shared_ptr< std::istream > IStreamPtr
Definition: constrainedfilestream.hpp:20
boost::shared_ptr< const Nif::NIFFile > NIFFilePtr
Definition: niffile.hpp:95
std::vector< Record * > roots
Root list. This is a select portion of the pointers from records.
Definition: niffile.hpp:33
bool getUseSkinning() const
Definition: niffile.cpp:220
void operator=(NIFFile const &)
Record * getRecord(size_t index) const
Get a given record.
Definition: niffile.hpp:69
size_t numRoots() const
Number of roots.
Definition: niffile.hpp:84
void parse(Files::IStreamPtr stream)
Parse the file.
Definition: niffile.cpp:136
NIFFile(NIFFile const &)
Private Copy Constructor.
Definition: niffile.hpp:20
const char * name
Definition: crashcatcher.cpp:59
std::string filename
File name, used for error messages and opening the file.
Definition: niffile.hpp:27