|
swift
|
Compile-time reflection toolkit for iterating over members of value classes. More...
Classes | |
| struct | swift::misc::MetaFlags< F > |
| Type wrapper for passing MetaFlag to CMetaMember::has. More... | |
| struct | swift::misc::CMetaMember< M, Flags > |
| Literal aggregate type representing attributes of one member of a value class. More... | |
| struct | swift::misc::CMetaMemberList< Members > |
| Literal aggregate type representing attributes of the members of a value class. More... | |
| class | swift::misc::CMetaClass |
| Base class for meta classes. More... | |
| class | swift::misc::CMetaClassIntrospector< MetaClass > |
| An introspector for a metaclass. More... | |
Macros | |
| #define | SWIFT_METACLASS(CLASS, ...) |
| Macro to define a nested metaclass that describes the attributes of its enclosing class. More... | |
| #define | SWIFT_METAMEMBER(MEMBER, ...) makeMetaMember(&Class::m_##MEMBER, #MEMBER SWIFT_TRAILING_VA_ARGS(__VA_ARGS__)) |
| Macro to define an element within a metaclass. More... | |
| #define | SWIFT_METAMEMBER_NAMED(MEMBER, NAME, ...) makeMetaMember(&Class::m_##MEMBER, NAME SWIFT_TRAILING_VA_ARGS(__VA_ARGS__)) |
| Same as SWIFT_METAMEMBER but the second parameter is a string literal containing the JSON name of the member. | |
Enumerations | |
| enum | swift::misc::MetaFlag { swift::misc::DisabledForComparison = 1 << 0 , swift::misc::DisabledForMarshalling = 1 << 1 , swift::misc::DisabledForDebugging = 1 << 2 , swift::misc::DisabledForHashing = 1 << 3 , swift::misc::DisabledForJson = 1 << 4 , swift::misc::CaseInsensitiveComparison = 1 << 5 , swift::misc::LosslessMarshalling = 1 << 6 , swift::misc::RequiredForJson = 1 << 7 } |
| Metadata flags attached to members of a meta class. More... | |
Functions | |
| template<quint64 A, quint64 B> | |
| constexpr MetaFlags< A|B > | swift::misc::operator| (MetaFlags< A >, MetaFlags< B >) |
| Compile-time union of MetaFlags. | |
| template<quint64 A, quint64 B> | |
| constexpr MetaFlags< A &B > | swift::misc::operator& (MetaFlags< A >, MetaFlags< B >) |
| Compile-time intersection of MetaFlags. | |
| template<typename T > | |
| constexpr auto | swift::misc::introspect () |
| Obtain the CMetaClassIntrospector for the metaclass of T. More... | |
Compile-time reflection toolkit for iterating over members of value classes.
| #define SWIFT_METACLASS | ( | CLASS, | |
| ... | |||
| ) |
Macro to define a nested metaclass that describes the attributes of its enclosing class.
Use in the private section of the class.
| CLASS | The name of the class containing the member. |
Definition at line 52 of file metaclass.h.
| #define SWIFT_METAMEMBER | ( | MEMBER, | |
| ... | |||
| ) | makeMetaMember(&Class::m_##MEMBER, #MEMBER SWIFT_TRAILING_VA_ARGS(__VA_ARGS__)) |
Macro to define an element within a metaclass.
Additional arguments can be supplied in the variadic part, which will be forwarded to CMetaClass::makeMetaMember.
| MEMBER | The name of the member without m_ part. |
Definition at line 72 of file metaclass.h.
Metadata flags attached to members of a meta class.
| Enumerator | |
|---|---|
| DisabledForComparison | Element will be ignored by compare() and comparison operators. |
| DisabledForMarshalling | Element will be ignored during DBus and QDataStream marshalling. |
| DisabledForDebugging | Element will be ignored when streaming to QDebug. |
| DisabledForHashing | Element will be ignored by qHash() |
| DisabledForJson | Element will be ignored during JSON serialization. |
| CaseInsensitiveComparison | Element will be compared case insensitively (must be a QString) |
| LosslessMarshalling | Element marshalling will preserve data at the expense of size. |
| RequiredForJson | Element is required when parsing from JSON. |
Definition at line 198 of file metaclass.h.
|
constexpr |
Obtain the CMetaClassIntrospector for the metaclass of T.
Definition at line 285 of file metaclass.h.