28 lines
515 B
C++
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
|