43 lines
680 B
C++
Executable File
43 lines
680 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 "sessiondata.h"
|
|
|
|
|
|
namespace Ticket
|
|
{
|
|
|
|
|
|
|
|
Ticket & SessionData::GetTicket(long id, SessionData::TicketMap & ticket_map, bool * is_new)
|
|
{
|
|
std::pair<TicketMap::iterator, bool> res = ticket_map.insert( std::make_pair(id, Ticket()) );
|
|
|
|
if( is_new )
|
|
*is_new = res.second;
|
|
|
|
return res.first->second;
|
|
}
|
|
|
|
|
|
|
|
std::vector<long> & SessionData::GetFileTab(long id, FileMap & file_map)
|
|
{
|
|
std::pair<FileMap::iterator, bool> res = file_map.insert( std::make_pair(id, std::vector<long>()) );
|
|
|
|
return res.first->second;
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|