#include "IResizable.hpp"

void TSE::IResizable::AddResizeNotifiable(IResizeNotifiable *obj)
{
    std::list<IResizeNotifiable*>::iterator it;
    for (it = objectsToResize.begin(); it != objectsToResize.end(); ++it)
    {
        if((*it) == obj){
            return; //return if already in list
        }
    }
    objectsToResize.push_back(obj);
}

void TSE::IResizable::RemoveResizeNotifiable(IResizeNotifiable *obj)
{
    std::list<IResizeNotifiable*>::iterator it;
    for (it = objectsToResize.begin(); it != objectsToResize.end(); ++it)
    {
        if((*it) == obj){
            objectsToResize.erase(it);
            break;
        }
    }
}
