mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-10 19:46:10 +08:00
refs #207, renamed CValueMap to CIndexVariantMap.
* The map will be used with CSimulaorInfo to transfer a variable number of setting information about the flight simulator. It is being used, because it is already DBus and tupel compliant. The new name better fits its purpose. * Add == operator for CIndexVariantMap (ambiguity error with tupels)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "blackmisc/avionavsystem.h"
|
||||
#include "blackmisc/aviotransponder.h"
|
||||
#include "blackmisc/avatcstationlist.h"
|
||||
#include "blackmisc/valuemap.h"
|
||||
#include "blackmisc/indexvariantmap.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QDebug>
|
||||
@@ -56,7 +56,7 @@ namespace BlackMiscTest
|
||||
qDebug() << atcList.toQString();
|
||||
|
||||
// put Jane in the tower
|
||||
CValueMap newController;
|
||||
CIndexVariantMap newController;
|
||||
newController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("112233", "Jane Doe")));
|
||||
atcList.applyIf(
|
||||
BlackMisc::Predicates::MemberEqual<CAtcStation>(&CAtcStation::getCallsign, CCallsign("eddm_twr")),
|
||||
@@ -65,7 +65,7 @@ namespace BlackMiscTest
|
||||
qDebug() << atcList.toQString();
|
||||
|
||||
// now Jane's time is over
|
||||
CValueMap anotherController;
|
||||
CIndexVariantMap anotherController;
|
||||
anotherController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("445566", "Fuzzy")));
|
||||
atcList.applyIf(newController, anotherController);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "testservice.h"
|
||||
#include "testservice_interface.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "blackmisc/valuemap.h"
|
||||
#include "blackmisc/indexvariantmap.h"
|
||||
#include "blackmisc/nwserver.h"
|
||||
#include <QTextStream>
|
||||
#include <QString>
|
||||
@@ -320,7 +320,7 @@ namespace BlackMiscTest
|
||||
qDebug() << "Send geo position" << geoPos;
|
||||
|
||||
// Value map
|
||||
CValueMap valueMap;
|
||||
CIndexVariantMap valueMap;
|
||||
valueMap.addValue(1, 111.222);
|
||||
valueMap.addValue(2, callsign);
|
||||
valueMap.addValue(3, alt);
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace BlackMiscTest
|
||||
/*
|
||||
* Receive value map
|
||||
*/
|
||||
void Testservice::receiveValueMap(const BlackMisc::CValueMap &valueMap) const
|
||||
void Testservice::receiveValueMap(const BlackMisc::CIndexVariantMap &valueMap) const
|
||||
{
|
||||
qDebug() << "Pid:" << ServiceTool::getPid() << "Received value map:" << valueMap;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace BlackMiscTest
|
||||
* \brief Receive an value map
|
||||
* \param valueMap
|
||||
*/
|
||||
void receiveValueMap(const BlackMisc::CValueMap &valueMap) const;
|
||||
void receiveValueMap(const BlackMisc::CIndexVariantMap &valueMap) const;
|
||||
|
||||
/*!
|
||||
* \brief Ping atc list
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace BlackMiscTest
|
||||
return asyncCallWithArgumentList(QLatin1String("receiveTransponder"), argumentList);
|
||||
}
|
||||
|
||||
inline QDBusPendingReply<> receiveValueMap(BlackMisc::CValueMap valueMap)
|
||||
inline QDBusPendingReply<> receiveValueMap(BlackMisc::CIndexVariantMap valueMap)
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
argumentList << QVariant::fromValue(valueMap);
|
||||
|
||||
Reference in New Issue
Block a user