8 #include <QDBusMetaType>
21 QStringList CPlatformSet::getPlatformNames()
const
24 for (
const CPlatform &p : *
this) { names.append(p.getPlatformName()); }
28 CPlatformSet CPlatformSet::matchesAny(CPlatform::Platform platform)
const
31 for (
const CPlatform &p : *
this)
33 if (!p.matchesAny(platform))
continue;
39 CPlatformSet CPlatformSet::exactMatch(CPlatform::Platform platform)
const
42 for (
const CPlatform &p : *
this)
44 if (p.getPlatform() != platform)
continue;
50 bool CPlatformSet::containsName(
const QString &platformName)
const
52 return this->contains(&CPlatform::getPlatformName, platformName);
55 const CPlatformSet &CPlatformSet::allPlatforms()
57 static const CPlatformSet platforms({ CPlatform::win32Platform(), CPlatform::win64Platform(),
58 CPlatform::linuxPlatform(), CPlatform::macOSPlatform() });
62 void CPlatformSet::registerMetadata()
64 qRegisterMetaType<swift::misc::CSequence<CPlatform>>();
65 qDBusRegisterMetaType<swift::misc::CSequence<CPlatform>>();
66 qRegisterMetaType<swift::misc::CCollection<CPlatform>>();
67 qDBusRegisterMetaType<swift::misc::CCollection<CPlatform>>();
68 qRegisterMetaType<CPlatformSet>();
69 qDBusRegisterMetaType<CPlatformSet>();
70 registerMetaValueType<CPlatformSet>();
#define SWIFT_DEFINE_COLLECTION_MIXINS(Namespace, T, Set)
Explicit template definition of mixins for a CCollection subclass.
Free functions in swift::misc.