10 #include <QStringList>
17 namespace swift::misc::simulation::fscommon
44 for (
const QString &s : stringList) { upper.
append(s.toUpper()); }
62 QString d(rule.getDistributor());
63 if (distributors.
contains(d)) {
continue; }
73 if (knownModels.
isEmpty()) {
return 0; }
81 for (
const QString &model : std::as_const(removeSet))
91 if (knownModels.
isEmpty()) {
return 0; }
117 exisitingModel.updateMissingParts(model);
size_type size() const
Returns number of elements in the collection.
void remove(const CVPilotModelRule &object)
Efficient remove using the find and erase of the implementation container. Typically O(log n).
int removeIf(Predicate p)
Remove elements for which a given predicate returns true.
auto findBy(Predicate p) const
Return a copy containing only those elements for which a given predicate returns true.
auto findFirstByOrDefault(Predicate p, const Value &def) const
Return a copy of the first element for which a given predicate returns true, or a default value if th...
void push_back(const T &value)
Appends an element at the end of the sequence.
Aircraft model (used by another pilot, my models on disk)
Value object encapsulating a list of aircraft models.
Value object encapsulating information of software distributor.
CAircraftModel toAircraftModel() const
Convert into aircraft model.
const QString & getModelName() const
Get model name.
Value object reading a set of vPilot rules.
QStringList getSortedModelNames() const
Model strings.
CVPilotModelRuleSet()=default
Default constructor.
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_DEFINE_COLLECTION_MIXINS(Namespace, T, Set)
Explicit template definition of mixins for a CCollection subclass.
void append(QList< T > &&value)
QList< T >::iterator begin()
QList< T >::iterator end()
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
QSet< T > & subtract(const QSet< T > &other)
bool isEmpty() const const
QString toUpper() const const
QString trimmed() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
void sort(Qt::CaseSensitivity cs)