moved: templatesnotify -> notify
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@686 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
59
notify/notifypool.cpp
Executable file
59
notify/notifypool.cpp
Executable file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user