Files
winix/notify/notifypool.cpp
Tomasz Sowa 5f46cd2ea5 moved: templatesnotify -> notify
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@686 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-12-02 02:16:11 +00:00

60 lines
611 B
C++
Executable File

/*
* 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);
}