engine/src/resources/resource.cpp

24 lines
497 B
C++
Raw Normal View History

2022-09-02 11:06:59 +00:00
#include "resources/resource.hpp"
#include <log.hpp>
2022-10-06 10:30:44 +00:00
namespace engine {
2022-09-02 11:06:59 +00:00
2022-10-06 10:30:44 +00:00
Resource::Resource(const std::filesystem::path& resPath, const std::string& type) : m_resourcePath(resPath), m_type(type)
{
if (m_type != "mesh")
TRACE("Creating {} resource: {}", type, resPath.filename().string());
}
2022-09-02 11:06:59 +00:00
2022-10-06 10:30:44 +00:00
Resource::~Resource()
{
if (m_type != "mesh")
TRACE("Destroyed {} resource: {}", m_type, m_resourcePath.filename().string());
}
std::string Resource::getType()
{
return m_type;
}
}