quake-tools/source/quam/archive.cc
2019-10-03 15:17:16 -04:00

28 lines
515 B
C++

#include "quam/archive.h"
#include <QMetaEnum>
Arc::FileType Arc::getFileType(int n) {
if(int t = QMetaEnum::fromType<Arc::FileType>().value(n); n != -1) {
return Arc::FileType(t);
} else {
throw std::range_error("invalid file type");
}
}
ArcNode::ArcNode(ArcDir &&t, std::string &&n, Arc::FileType ty) :
super_type(std::move(t)),
name(std::move(n)),
type(ty)
{
}
ArcNode::ArcNode(ArcFile &&t, std::string &&n, Arc::FileType ty) :
super_type(std::move(t)),
name(std::move(n)),
type(ty)
{
}
// EOF