refs #306, refs #282 Thread safety of readers

In the same step:
* renaming private slots ps_xy
* doxygen
* removed outdated debug messages
This commit is contained in:
Klaus Basan
2014-07-27 02:55:16 +02:00
parent 2cf690d4fe
commit 3cf42b218a
8 changed files with 138 additions and 72 deletions

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of Swift Project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "blackmisc/sequence.h"
#include "blackmisc/avatcstation.h"
#include "blackmisc/nwuser.h"
@@ -42,19 +51,19 @@ namespace BlackCore
this->setPendingNetworkReply(r);
}
const CAircraftList &CVatsimDataFileReader::getAircrafts()
CAircraftList CVatsimDataFileReader::getAircrafts() const
{
QReadLocker rl(&this->m_lock);
return this->m_aircrafts;
}
const CAtcStationList &CVatsimDataFileReader::getAtcStations()
CAtcStationList CVatsimDataFileReader::getAtcStations() const
{
QReadLocker rl(&this->m_lock);
return this->m_atcStations;
}
const CServerList &CVatsimDataFileReader::getVoiceServers()
CServerList CVatsimDataFileReader::getVoiceServers() const
{
QReadLocker rl(&this->m_lock);
return this->m_voiceServers;
@@ -78,6 +87,11 @@ namespace BlackCore
return aircraft.getIcaoInfo();
}
void CVatsimDataFileReader::updateWithVatsimDataFileData(CAircraft &aircraftToBeUdpated) const
{
this->getAircrafts().updateWithVatsimDataFileData(aircraftToBeUdpated);
}
CUserList CVatsimDataFileReader::getControllersForCallsign(const CCallsign &callsign)
{
CCallsignList callsigns;