Refactoring in SizeNotifiable.

Class is a template now and accepts a registraton policy.
This commit is contained in:
King_DuckZ 2014-03-20 20:21:59 +01:00
parent dbf29f13d1
commit d0a052ddb2
7 changed files with 122 additions and 22 deletions

View file

@ -28,7 +28,7 @@ namespace cloonel {
SDL_Window* window;
SDL_Renderer* renderer;
SizeRatio sizeratio;
ObserversManager<SizeNotifiable*> resChangeNotifList;
ObserversManager<SizeNotifiableBase*> resChangeNotifList;
bool initialized;
};
@ -108,7 +108,7 @@ namespace cloonel {
///------------------------------------------------------------------------
///------------------------------------------------------------------------
size_t SDLMain::RegisterForResChange (SizeNotifiable* parNotif) {
size_t SDLMain::RegisterForResChange (SizeNotifiableBase* parNotif) {
parNotif->NotifyResChanged(m_localData->sizeratio);
return m_localData->resChangeNotifList.Add(parNotif);
}