/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2010, Tomasz Sowa * All rights reserved. * */ #include "notifypool.h" bool NotifyPool::Empty() const { return notify_pool.empty(); } size_t NotifyPool::Size() const { return notify_pool.size(); // it has O(n) } NotifyMsg & NotifyPool::GetFirst() { return *notify_pool.begin(); } void NotifyPool::DeleteFirst() { if( notify_pool.empty() ) return; notify_pool.erase(notify_pool.begin()); } void NotifyPool::Add(const NotifyMsg & msg) { notify_pool.insert(notify_pool.end(), msg); }