/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2008-2010, Tomasz Sowa * All rights reserved. * */ #ifndef headerfilecmslucoresessioncontainer #define headerfilecmslucoresessioncontainer #include #include #include #include "session.h" #include "lastcontainer.h" class SessionContainer { public: typedef std::list Table; typedef Table::iterator Iterator; typedef Table::size_type TableSize; typedef std::map IndexId; typedef std::multimap IndexTime; void SetLastContainer(LastContainer * plast_container); private: LastContainer * last_container; Table table; IndexId index_id; IndexTime index_time; void DelFromIdIndex(Iterator iter); public: void Clear(); TableSize Size(); Iterator Begin(); Iterator End(); Session & Back(); bool PushBack(const Session & session); Iterator FindById(long); void DelFirstByTimeInterval(time_t interval, bool skip_remember_flag = true); void UpdateLastTime(Iterator iter, time_t new_time); }; #endif