mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
Ref T280, definitions for QHash<CCallsign, T> for
* situation * situation list * client * parts * parts list * functions to convert standard swift containers into QMap/QHash<CCallign, T>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
|
||||
#include <QHash>
|
||||
#include <QMap>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -78,7 +79,7 @@ namespace BlackMisc
|
||||
CONTAINER findBySuffix(const QString &suffix) const;
|
||||
|
||||
//! First found index of callsign, otherwise -1
|
||||
int firstIndexOfCallsign(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
int firstIndexOfCallsign(const CCallsign &callsign);
|
||||
|
||||
//! Remove all objects with callsign
|
||||
int removeByCallsign(const CCallsign &callsign);
|
||||
@@ -90,7 +91,7 @@ namespace BlackMisc
|
||||
QMap<QString, int> getSuffixes() const;
|
||||
|
||||
//! Split into 0..n containers as per callsign
|
||||
QHash<BlackMisc::Aviation::CCallsign, CONTAINER> splitPerCallsign() const;
|
||||
QHash<CCallsign, CONTAINER> splitPerCallsign() const;
|
||||
|
||||
//! Replace or add objects by callsign
|
||||
int replaceOrAddObjectByCallsign(const OBJ &otherObject);
|
||||
@@ -104,6 +105,12 @@ namespace BlackMisc
|
||||
//! Sort by callsign
|
||||
void sortByCallsign();
|
||||
|
||||
//! Turn into callsign map
|
||||
QMap<CCallsign, OBJ> asCallsignMap() const;
|
||||
|
||||
//! Turn into callsign hash
|
||||
QHash<CCallsign, OBJ> asCallsignHash() const;
|
||||
|
||||
//! Copy of list sorted by callsign
|
||||
CONTAINER sortedByCallsign() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user