[Gcblue-commits] gcb_wx/src/sim tcUserSelectedGroups.cpp,NONE,1.1
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-28 00:41:11
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10560/src/sim Added Files: tcUserSelectedGroups.cpp Log Message: --- NEW FILE: tcUserSelectedGroups.cpp --- /** @file tcUserSelectedGroups.cpp ** ** Copyright (C) 2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "tcUserSelectedGroups.h" /** * Singleton instance accessor */ tcUserSelectedGroups* tcUserSelectedGroups::Get() { static tcUserSelectedGroups instance; return &instance; } /** * */ void tcUserSelectedGroups::ClearGroups() { groupMap.clear(); } /** * */ std::vector<long> tcUserSelectedGroups::GetGroup(int idx) { std::vector<long> platforms; std::map<int, std::vector<long> >::iterator iter; iter = groupMap.find(idx); if (iter != groupMap.end()) { platforms = iter->second; } return platforms; } /** * */ void tcUserSelectedGroups::SetGroup(int idx, const std::vector<long>& platforms) { groupMap[idx] = platforms; } /** * */ tcUserSelectedGroups::tcUserSelectedGroups() { } /** * */ tcUserSelectedGroups::~tcUserSelectedGroups() { } |