Select Git revision
SyncData.cpp
SyncData.cpp 8.69 KiB
/**
* @file SyncData.cpp
* @author Ulrich Kemloh <kemlohulrich@gmail.com>
* @version 0.1
* Copyright (C) <2009-2010>
*
* @section LICENSE
* This file is part of OpenPedSim.
*
* OpenPedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenPedSim 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 OpenPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* @section DESCRIPTION
* This class contains the data (trajectories / floor field) after they have
* been parsed in the appropriate structure. They are either read from a file or obtained via a TCP socket
*
* \brief maintains the parsed data in an appropriate structure
*
*
* Created on: 02.06.2009
*
*/
#include "SyncData.h"
#include "Frame.h"
#include "TrajectoryPoint.h"
#include "Message.h"
#include "Debug.h"
#include <QMutex>
#include <QObject>
#include <QStringList>
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
using namespace std;
SyncData::SyncData()
{
_frameCursor=0;
_numberOfAgents=0;
_frameCursorOffset=0;
}
SyncData::~SyncData()
{
//while (!_frames.empty()) {
// delete _frames.back();
// _frames.pop_back();
//}
//
for(auto itr = _frames.begin(); itr != _frames.end(); itr++)
{
delete itr->second;
}