swift
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"
17 #include "misc/swiftmiscexport.h"
18 
19 SWIFT_DECLARE_COLLECTION_MIXINS(swift::misc::simulation::fscommon, CVPilotModelRule, CVPilotModelRuleSet)
20 
21 namespace swift::misc::simulation::fscommon
22 {
26  public CCollection<CVPilotModelRule>,
27  public mixin::MetaType<CVPilotModelRuleSet>
28  {
29  public:
32 
34  CVPilotModelRuleSet() = default;
35 
38 
40  CVPilotModelRuleSet findByModelName(const QString &modelName) const;
41 
43  CVPilotModelRule findFirstByModelName(const QString &modelName) const;
44 
46  CVPilotModelRuleSet findModelsStartingWith(const QString &modelName) const;
47 
49  QStringList getSortedModelNames() const;
50 
52  QStringList getSortedDistributors() const;
53 
55  int removeModels(const QStringList &modelsToBeRemoved);
56 
58  int keepModels(const QStringList &modelsToBeKept);
59 
62  simulation::CAircraftModelList toAircraftModels() const;
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:107
CCollection()=default
Default constructor.
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
Definition: mixinmetatype.h:29
Value object encapsulating a list of aircraft models.
Value object encapsulating information of software distributor.
Value object reading a set of vPilot rules.
#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.