52 lines
2.1 KiB
C
52 lines
2.1 KiB
C
|
/******************************************************************************
|
||
|
* \file SHAssetMetaHandler.h
|
||
|
* \author Loh Xiao Qi
|
||
|
* \brief Handler classes for meta data for all resources
|
||
|
*
|
||
|
* \copyright Copyright (c) 2021 Digipen Institute of Technology. Reproduction
|
||
|
* or disclosure of this file or its contents without the prior
|
||
|
* written consent of Digipen Institute of Technology is prohibited
|
||
|
******************************************************************************/
|
||
|
#ifndef SH_RESOURCE_META_HANDLER_H
|
||
|
#define SH_RESOURCE_META_HANDLER_H
|
||
|
|
||
|
#include "SHAssetMacros.h"
|
||
|
#include "SHAssetMeta.h"
|
||
|
|
||
|
namespace SHADE
|
||
|
{
|
||
|
struct SHAssetMetaHandler
|
||
|
{
|
||
|
/****************************************************************************
|
||
|
* \param String containing extension of resource file
|
||
|
|
||
|
* \brief Get correct resource type from file extension of resource.
|
||
|
****************************************************************************/
|
||
|
static AssetType GetTypeFromExtension(AssetExtension) noexcept;
|
||
|
|
||
|
/****************************************************************************
|
||
|
* \param String containing extension of resource file
|
||
|
|
||
|
* \brief Get correct resource type from file extension of resource.
|
||
|
****************************************************************************/
|
||
|
static AssetExtension GetExtensionFromType(AssetType) noexcept;
|
||
|
|
||
|
/****************************************************************************
|
||
|
* \param Create class containing meta data from meta file
|
||
|
|
||
|
* \brief path to meta data file
|
||
|
****************************************************************************/
|
||
|
static SHAssetMeta RetrieveMetaData(AssetPath const&) noexcept;
|
||
|
|
||
|
/****************************************************************************
|
||
|
* \param Asset meta data to be written into
|
||
|
* \param Path to be written into
|
||
|
|
||
|
* \brief Writes meta data into text file
|
||
|
****************************************************************************/
|
||
|
static void WriteMetaData(SHAssetMeta const&, AssetPath const&) noexcept;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif // !SH_RESOURCE_META_HANDLER_H
|