📄 reloadablebundle.h
字号:
// --------------------------------------------------------------------------
// Dingus project - a collection of subsystems for game/graphics applications
// --------------------------------------------------------------------------
#ifndef __RELOADABLE_BUNDLE_H
#define __RELOADABLE_BUNDLE_H
#include "../utils/Notifier.h"
namespace dingus {
/**
* Reloadable resource (usually bundle).
*
* Is able to reload all the resources it contains. The application won't
* notice this, because it's dealing with proxies anyway. Reloading should
* preserve the resource proxy objects, only change the objects they refer to.
*/
class IReloadableBundle {
public:
virtual ~IReloadableBundle() = 0 { }
virtual void reload() = 0;
};
/**
* Manager for reloadable bundles.
*/
class CReloadableBundleManager : public IReloadableBundle, public CNotifier<IReloadableBundle> {
public:
// IReloadableBundle
virtual void reload() {
int n = getListeners().size();
for( int i = 0; i < n; ++i )
getListeners()[i]->reload();
}
};
}; // namespace
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -