2024-02-05 22:25:30 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ehs/Types.h"
|
|
|
|
#include "ehs/Str.h"
|
|
|
|
#include "ehs/Vec2.h"
|
|
|
|
#include "ehs/BaseObj.h"
|
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
2024-07-24 01:36:20 -07:00
|
|
|
class EHS_LIB_IO Resource : public BaseObj
|
2024-02-05 22:25:30 -08:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
ehs::UInt_64 hashId;
|
|
|
|
ehs::Str_8 id;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Resource();
|
|
|
|
|
|
|
|
Resource(ehs::Str_8 id);
|
|
|
|
|
|
|
|
Resource(Resource&& rsrc) noexcept;
|
|
|
|
|
|
|
|
Resource(const Resource& rsrc);
|
|
|
|
|
|
|
|
Resource& operator=(Resource&& rsrc) noexcept;
|
|
|
|
|
|
|
|
Resource& operator=(const Resource& rsrc);
|
|
|
|
|
|
|
|
bool operator==(ehs::UInt_64 otherHashId) const;
|
|
|
|
|
|
|
|
bool operator!=(ehs::UInt_64 otherHashId) const;
|
|
|
|
|
|
|
|
virtual void Release();
|
|
|
|
|
|
|
|
void SetId(ehs::Str_8 newId);
|
|
|
|
|
|
|
|
ehs::UInt_64 GetHashId() const;
|
|
|
|
|
|
|
|
ehs::Str_8 GetId() const;
|
|
|
|
|
|
|
|
virtual bool IsValid() const;
|
|
|
|
|
|
|
|
Resource* Clone() const override;
|
|
|
|
};
|
|
|
|
}
|