8 #include <QDBusMetaType>
22 for (
const CPlatform &p : *
this) { names.
append(p.getPlatformName()); }
26 CPlatformSet CPlatformSet::matchesAny(CPlatform::Platform platform)
const
29 for (
const CPlatform &p : *
this)
31 if (!p.matchesAny(platform))
continue;
37 CPlatformSet CPlatformSet::exactMatch(CPlatform::Platform platform)
const
40 for (
const CPlatform &p : *
this)
42 if (p.getPlatform() != platform)
continue;
48 bool CPlatformSet::containsName(
const QString &platformName)
const
50 return this->contains(&CPlatform::getPlatformName, platformName);
53 const CPlatformSet &CPlatformSet::allPlatforms()
55 static const CPlatformSet platforms({ CPlatform::win32Platform(), CPlatform::win64Platform(),
56 CPlatform::linuxPlatform(), CPlatform::macOSPlatform() });
60 void CPlatformSet::registerMetadata()
62 qRegisterMetaType<swift::misc::CSequence<CPlatform>>();
63 qDBusRegisterMetaType<swift::misc::CSequence<CPlatform>>();
64 qRegisterMetaType<swift::misc::CCollection<CPlatform>>();
65 qDBusRegisterMetaType<swift::misc::CCollection<CPlatform>>();
66 qRegisterMetaType<CPlatformSet>();
67 qDBusRegisterMetaType<CPlatformSet>();
68 registerMetaValueType<CPlatformSet>();
#define SWIFT_DEFINE_COLLECTION_MIXINS(Namespace, T, Set)
Explicit template definition of mixins for a CCollection subclass.
Free functions in swift::misc.
void append(QList< T > &&value)
QList< T >::iterator insert(QList< T >::const_iterator before, QList< T >::parameter_type value)