swift
Loading...
Searching...
No Matches
vpilotmodelruleset.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_SIMULATION_FSCOMMON_VPILOTMODELRULELIST_H
7#define SWIFT_MISC_SIMULATION_FSCOMMON_VPILOTMODELRULELIST_H
8
9#include <QMetaType>
10#include <QString>
11#include <QStringList>
12
13#include "misc/collection.h"
14#include "misc/sequence.h"
18
19SWIFT_DECLARE_COLLECTION_MIXINS(swift::misc::simulation::fscommon, CVPilotModelRule, CVPilotModelRuleSet)
20
21namespace swift::misc::simulation::fscommon
22{
26 public CCollection<CVPilotModelRule>,
27 public mixin::MetaType<CVPilotModelRuleSet>
28 {
29 public:
32
35
38
40 CVPilotModelRuleSet findByModelName(const QString &modelName) const;
41
43 CVPilotModelRule findFirstByModelName(const QString &modelName) const;
44
47
50
53
55 int removeModels(const QStringList &modelsToBeRemoved);
56
58 int keepModels(const QStringList &modelsToBeKept);
59
63
64 private:
66 static QStringList toUpper(const QStringList &stringList);
67 };
68} // namespace swift::misc::simulation::fscommon
69
72
73#endif // SWIFT_MISC_SIMULATION_FSCOMMON_VPILOTMODELRULELIST_H
Generic ordered container with value semantics.
Definition collection.h:113
CCollection()=default
Default constructor.
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
Value object encapsulating a list of aircraft models.
Value object encapsulating information of software distributor.
Value object reading a set of vPilot rules.
int removeModels(const QStringList &modelsToBeRemoved)
Removed given models.
QStringList getSortedDistributors() const
List of distributors.
simulation::CAircraftModelList toAircraftModels() const
To aircraft models.
CVPilotModelRuleSet findModelsStartingWith(const QString &modelName) const
Find models starting with.
int keepModels(const QStringList &modelsToBeKept)
Keep given models (if in list).
CVPilotModelRuleSet findByModelName(const QString &modelName) const
Find by model string.
CVPilotModelRule findFirstByModelName(const QString &modelName) const
Find first by model string.
#define SWIFT_DECLARE_COLLECTION_MIXINS(Namespace, T, Set)
Explicit template declaration of mixins for a CCollection subclass to be placed near the top of the h...
Definition collection.h:61
#define SWIFT_MISC_DECLARE_USING_MIXIN_METATYPE(DERIVED)
When a derived class and a base class both inherit from mixin::MetaType, the derived class uses this ...
#define SWIFT_MISC_EXPORT
Export a class or function from the library.