Definition at line 24 of file ResMgr.h.
◆ ~ResMgr()
Definition at line 15 of file ResMgr.cpp.
15 {
16 Exterminate();
17}
◆ Exterminate()
void ResMgr::Exterminate |
( |
| ) |
|
Definition at line 32 of file ResMgr.cpp.
32 {
33 SAFE_DELETE(m_assetManager);
34}
◆ GetAssetReference()
Definition at line 50 of file ResMgr.cpp.
50 {
51 return m_assetManager->GetAsset(name);
52}
◆ GetAssetReferences()
Definition at line 67 of file ResMgr.cpp.
67 {
68 return m_assetManager->GetAssets(type);
69}
◆ GetObjectByHash()
template<class TYPE >
TYPE * CSE::ResMgr::GetObjectByHash |
( |
const std::string & |
hash | ) |
const |
Definition at line 66 of file ResMgr.h.
66 {
67 if(m_objects.count(hash) <= 0) return nullptr;
68
69 return static_cast<TYPE*>(Get(hash));
70 }
◆ GetSResource()
SResource * ResMgr::GetSResource |
( |
std::string |
name | ) |
const |
Definition at line 54 of file ResMgr.cpp.
54 {
55 if(m_objects.count(name) > 0) return Get(name);
56 make_lower(name);
57 for (const auto& pair : m_objects) {
58 const auto& res = pair.second;
59 if (make_lower_copy(res->GetName()) == name)
60 return res;
61 if (make_lower_copy(res->GetAbsoluteID()) == name)
62 return res;
63 }
64 return nullptr;
65}
◆ GetStringHash()
int ResMgr::GetStringHash |
( |
const std::string & |
str | ) |
|
Definition at line 41 of file ResMgr.cpp.
41 {
42 auto result = std::find(m_stringIds.begin(), m_stringIds.end(), str);
43 if (result != m_stringIds.end())
44 return result - m_stringIds.begin();
45
46 m_stringIds.push_back(str);
47 return m_stringIds.size() - 1;
48}
◆ Init()
◆ InitResource()
void ResMgr::InitResource |
( |
| ) |
|
Definition at line 23 of file ResMgr.cpp.
23 {
24
25 if(m_assetManager == nullptr)
27
28
29 m_assetManager->LoadAssets(Settings::IsAssetsPacked());
30}
◆ Remove()
Definition at line 36 of file ResMgr.cpp.
36 {
38 CORE->GetCore(
MemoryMgr)->ReleaseObject(m_object,
true);
39}
◆ AssetMgr
The documentation for this class was generated from the following files: