EHS
Loading...
Searching...
No Matches
Resource.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/Types.h"
4#include "ehs/Str.h"
5#include "ehs/Vec2.h"
6#include "ehs/BaseObj.h"
7
8namespace ehs
9{
10 class EHS_LIB_IO Resource : public BaseObj
11 {
12 private:
13 ehs::UInt_64 hashId;
14 ehs::Str_8 id;
15
16 public:
17 Resource();
18
20
21 Resource(Resource&& rsrc) noexcept;
22
23 Resource(const Resource& rsrc);
24
25 Resource& operator=(Resource&& rsrc) noexcept;
26
27 Resource& operator=(const Resource& rsrc);
28
29 bool operator==(ehs::UInt_64 otherHashId) const;
30
31 bool operator!=(ehs::UInt_64 otherHashId) const;
32
33 virtual void Release();
34
35 void SetId(ehs::Str_8 newId);
36
37 ehs::UInt_64 GetHashId() const;
38
39 ehs::Str_8 GetId() const;
40
41 virtual bool IsValid() const;
42
43 Resource* Clone() const override;
44 };
45}
bool operator!=(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1916
bool operator==(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1906
BaseObj()
Definition BaseObj.cpp:10
virtual bool IsValid() const
Definition Resource.cpp:86
ehs::Str_8 GetId() const
Definition Resource.cpp:81
Resource * Clone() const override
Definition Resource.cpp:91
ehs::UInt_64 GetHashId() const
Definition Resource.cpp:76
void SetId(ehs::Str_8 newId)
Definition Resource.cpp:70
Resource()
Definition Resource.cpp:5
Resource & operator=(Resource &&rsrc) noexcept
Definition Resource.cpp:28
virtual void Release()
Definition Resource.cpp:66
Definition Anchor.h:6
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1902