Files
Seele/src/Engine/Asset/Asset.cpp
T

48 lines
713 B
C++
Raw Normal View History

2020-05-05 01:51:13 +02:00
#include "Asset.h"
2020-09-19 14:36:50 +02:00
#include "AssetRegistry.h"
2023-02-13 14:56:13 +01:00
#include "Graphics/Graphics.h"
2020-05-05 01:51:13 +02:00
using namespace Seele;
Asset::Asset()
2023-02-13 14:56:13 +01:00
: folderPath("")
2020-06-02 11:46:18 +02:00
, name("")
, status(Status::Uninitialized)
2022-01-12 14:40:26 +01:00
, byteSize(0)
2020-06-02 11:46:18 +02:00
{
}
2023-02-13 14:56:13 +01:00
Asset::Asset(std::string_view _folderPath, std::string_view _name)
2023-11-06 14:47:21 +01:00
: folderPath(_folderPath)
2023-02-13 14:56:13 +01:00
, name(_name)
2023-11-06 14:47:21 +01:00
, status(Status::Uninitialized)
2020-06-02 11:46:18 +02:00
{
2023-02-13 14:56:13 +01:00
if (folderPath.empty())
2020-09-19 14:36:50 +02:00
{
2023-02-13 14:56:13 +01:00
assetId = name;
2020-09-19 14:36:50 +02:00
}
else
{
2023-02-13 14:56:13 +01:00
assetId = folderPath + "/" + name;
2020-09-19 14:36:50 +02:00
}
2020-06-02 11:46:18 +02:00
}
2020-05-05 01:51:13 +02:00
Asset::~Asset()
{
2020-06-02 11:46:18 +02:00
}
2023-02-13 14:56:13 +01:00
std::string Asset::getFolderPath() const
2020-06-02 11:46:18 +02:00
{
2023-02-13 14:56:13 +01:00
return folderPath;
2020-06-02 11:46:18 +02:00
}
2023-02-13 14:56:13 +01:00
std::string Asset::getName() const
2020-06-02 11:46:18 +02:00
{
2023-02-13 14:56:13 +01:00
return name;
2020-06-02 11:46:18 +02:00
}
2023-02-13 14:56:13 +01:00
std::string Asset::getAssetIdentifier() const
2020-06-02 11:46:18 +02:00
{
2023-02-13 14:56:13 +01:00
return assetId;
2020-06-02 11:46:18 +02:00
}