Files
winix/notify/notifypool.cpp
Tomasz Sowa 7468e7a36c added: namespace Winix over all *.h/*.cpp files
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@948 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-02-12 16:30:49 +00:00

51 lines
643 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
*/
#include "notifypool.h"
namespace Winix
{
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);
}
} // namespace Winix