Skip to content
Snippets Groups Projects
Select Git revision
  • f1edb836a87bbaf5cad873f0f597560c9fb7ce84
  • master default protected
  • 67-multithreading-is-plattform-dependent
  • cmake_windows
  • v0.8.4
  • v0.8.3
  • v0.8.2
  • v0.8
  • v0.7
  • v0.6
  • v0.5-alpha
  • v0.4
12 results

SyncData.cpp

Blame
  • 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;
        }