2022-06-28 22:32:11 +00:00
|
|
|
#ifndef OPENMW_MWCLASS_CLASSMODEL_H
|
|
|
|
#define OPENMW_MWCLASS_CLASSMODEL_H
|
|
|
|
|
|
|
|
#include "../mwworld/livecellref.hpp"
|
2022-09-22 18:26:05 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2022-06-28 22:32:11 +00:00
|
|
|
|
2024-01-27 15:26:31 +00:00
|
|
|
#include <string_view>
|
2022-06-28 22:32:11 +00:00
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
{
|
|
|
|
template <class Class>
|
2024-01-27 15:26:31 +00:00
|
|
|
std::string_view getClassModel(const MWWorld::ConstPtr& ptr)
|
2022-06-28 22:32:11 +00:00
|
|
|
{
|
2022-09-22 18:26:05 +00:00
|
|
|
const MWWorld::LiveCellRef<Class>* ref = ptr.get<Class>();
|
2024-01-27 15:26:31 +00:00
|
|
|
return ref->mBase->mModel;
|
2022-06-28 22:32:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|