Introducing KRResourceManager superclass
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "KRBundle.h"
|
||||
|
||||
KRBundleManager::KRBundleManager(KRContext &context) : KRContextObject(context) {
|
||||
KRBundleManager::KRBundleManager(KRContext &context) : KRResourceManager(context) {
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,21 @@ KRBundleManager::~KRBundleManager() {
|
||||
m_bundles.empty();
|
||||
}
|
||||
|
||||
KRResource* KRBundleManager::loadResource(const std::string& name, const std::string& extension, KRDataBlock* data)
|
||||
{
|
||||
if (extension.compare("krbundle") == 0) {
|
||||
return loadBundle(name.c_str() , data);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
KRResource* KRBundleManager::getResource(const std::string& name, const std::string& extension)
|
||||
{
|
||||
if (extension.compare("krbundle") == 0) {
|
||||
return getBundle(name.c_str());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
KRBundle *KRBundleManager::loadBundle(const char *szName, KRDataBlock *pData)
|
||||
{
|
||||
KRBundle *pBundle = new KRBundle(*m_pContext, szName, pData);
|
||||
|
||||
Reference in New Issue
Block a user