/** * @brief * Removes a resource handler */ bool Resource::RemoveHandler(ResourceHandler &cHandler) { if (m_lstHandlers.Remove(&cHandler)) { cHandler.SetResource(); // Done return true; } else { // Error! return false; } }
/** * @brief * Adds a resource handler */ bool Resource::AddHandler(ResourceHandler &cHandler) { // Is this handler already registered? if (!m_lstHandlers.IsElement(&cHandler)) { if (m_lstHandlers.Add(&cHandler)) { if (cHandler.GetResource() != this) cHandler.SetResource(this); } else { // Error! return false; } } // Done return true; }