18 #define kTypeName kText64
27 typedef k32u kTypeFlags;
30 #define kTYPE_FLAGS_CLASS (0x01)
31 #define kTYPE_FLAGS_INTERFACE (0x02)
32 #define kTYPE_FLAGS_VALUE (0x04)
33 #define kTYPE_FLAGS_ENUM (0x08)
34 #define kTYPE_FLAGS_BIT_ENUM (0x10)
35 #define kTYPE_FLAGS_ABSTRACT (0x20)
36 #define kTYPE_FLAGS_ARRAY_VALUE (0x40)
45 typedef kPointer kTypeVersion;
534 #define kType_Assembly_(TYPE) kxType_Assembly_(TYPE)
535 #define kType_Is_(TYPE, OTHER) kxType_Is_(TYPE, OTHER)
536 #define kType_IsValue_(TYPE) kxType_IsValue_(TYPE)
537 #define kType_IsClass_(TYPE) kxType_IsClass_(TYPE)
538 #define kType_IsInterface_(TYPE) kxType_IsInterface_(TYPE)
539 #define kType_IsAbstract_(TYPE) kxType_IsAbstract_(TYPE)
540 #define kType_IsReference_(TYPE) kxType_IsReference_(TYPE)
541 #define kType_IsEnum_(TYPE) kxType_IsEnum_(TYPE)
542 #define kType_IsBitEnum_(TYPE) kxType_IsBitEnum_(TYPE)
543 #define kType_IsArrayValue_(TYPE) kxType_IsArrayValue_(TYPE)
544 #define kType_Implements_(TYPE, IFACE) kxType_Implements_(TYPE, IFACE)
545 #define kType_Extends_(TYPE, BASE) kxType_Extends_(TYPE, BASE)
546 #define kType_Base_(TYPE) kxType_Base_(TYPE)
547 #define kType_Size_(TYPE) kxType_Size_(TYPE)
548 #define kType_InnerSize_(TYPE) kxType_InnerSize_(TYPE)
549 #define kType_VTable_(TYPE) kxType_VTable_(TYPE)
550 #define kType_Static_(TYPE) kxType_Static_(TYPE)
555 #include <kApi/kType.x.h>
Represents a 64-unit, null-terminated, kChar sequence.
kBool kType_IsValue(kType type)
Determines whether a type represents a value (primitive, struct, enum).
kBool kType_Extends(kType type, kType baseType)
Determines whether a type extends another type.
kBool kType_Implements(kType type, kType interfaceType)
Determines whether a type implements a specific interface.
kFunction serialize
Serialization method.
Definition: kType.h:94
kTypeName methodName
Method name (e.g. "Clone").
Definition: kType.h:54
kStatus kType_FindEnumeratorInfo(kType type, k32s value, const kEnumeratorInfo **info)
Finds enumerator metadata for the enumerator with the specified value.
kTypeName name
Enumerator name (e.g. "kPIXEL_FORMAT_8BPP_GREYSCALE").
Definition: kType.h:80
kBool kType_IsClass(kType type)
Determines whether a type represents a class.
kBool kType_IsArrayValue(kType type)
Reports whether the type is an 'array-value' type (e.g., kText32)
Represents a library of types.
void * kType_Static(kType type)
Gets a pointer to the type's static data structure.
const kFieldInfo * kType_FieldInfoAt(kType type, kSize index)
Gets metadata for the field at the specified index.
Represents an unsigned integer that can store a pointer address.
const kTypeVersionInfo * kType_VersionInfoAt(kType type, kSize index)
Gets metadata for the serialization version at the specified index.
kBool kType_IsInterface(kType type)
Determines whether a type represents an interface.
const kEnumeratorInfo * kType_EnumeratorInfoAt(kType type, kSize index)
Gets metadata for the enumerator at the specified index.
kSize kType_EnumeratorCount(kType type)
Reports count of registered enumerators for the given enumeration type.
kTypeName displayName
Formatted display name (e.g. "8bpp Greyscale");.
Definition: kType.h:81
kBool kType_StaticInitialized(kType type)
Reports whether the type's static data structure has been successfully initialized.
Represents type field information.
Definition: kType.h:64
kSize kType_MethodCount(kType type)
Reports count of non-virtual methods.
kType kType_InterfaceAt(kType type, kSize index)
Gets the implemented interface at the specified index.
kSize kType_VMethodCount(kType type)
Reports count of virtual methods.
Represents enumerator information.
Definition: kType.h:77
Represents a single unit (byte) in a UTF-8 character.
kStatus kType_FormatEnumerator(kType type, k32s value, kChar *displayName, kSize capacity)
Formats an enumerator value to a text buffer using the enumerator display name.
kFunction * kType_VTable(kType type)
Gets a pointer to the type's primary virtual method table.
kType kType_Base(kType type)
Gets the base of a class or interface.
const kChar * kType_Name(kType type)
Gets the name of the type.
kStatus kType_FindMethodInfo(kType type, const kChar *name, const kMethodInfo **info)
Finds metadata for the non-virtual method with the specified name.
kVersion formatVersion
Serialization format version (e.g. "6.0.0.0").
Definition: kType.h:92
kText64 guid
Unique id (e.g. "kArrayList-0").
Definition: kType.h:93
Represents type method information.
Definition: kType.h:52
kTypeName name
Field name.
Definition: kType.h:66
kSize kType_FieldCount(kType type)
Reports count of registered fields for the given type.
kSize kType_VersionCount(kType type)
Reports count of registered serialization versions.
Core Zen type declarations.
kBool kType_IsReference(kType type)
Determines whether a type represents a class or interface.
Represents a 32-bit signed integer.
kSize kType_Size(kType type)
Gets the external size of a type.
kSize kType_IMethodCount(kType type, kType interfaceType)
Reports count of interface methods for the given interface.
void(kCall * kFunction)()
Generic pointer to function.
Definition: kApiDef.h:28
kSize kType_InterfaceCount(kType type)
Reports count of implemented interfaces.
kBool kType_IsEnum(kType type)
Reports whether the type is an enumeration.
kType type
Field type.
Definition: kType.h:67
kBool kType_IsAbstract(kType type)
Determines whether a type represents an abstract class.
const kMethodInfo * kType_MethodInfoAt(kType type, kSize index)
Gets metadata for the non-virtual method at the specified index.
Represents a 16-unit, null-terminated, kChar sequence.
kAssembly kType_Assembly(kType type)
Gets the assembly to which the type belongs.
const kMethodInfo * kType_IMethodInfoAt(kType type, kType interfaceType, kSize index)
Gets metadata for the interface method at the specified index.
Represents metadata about a type (class, interface, or value).
kStatus kType_ParseEnumerator(kType type, k32s *value, const kChar *displayName)
Parses an enumerator value from a text buffer using the enumerator display name.
k32s value
Enumerator numeric value.
Definition: kType.h:79
kTypeName functionName
Full function name (e.g. "kObject_Clone").
Definition: kType.h:55
kSize kType_InnerSize(kType type)
Gets the internal size of a type.
Represents a version number.
Represents an error code.
kSize offset
Offset of field within structure (bytes).
Definition: kType.h:68
Represents serialization version information.
Definition: kType.h:89
kBool kType_Is(kType type, kType other)
Determines whether a type is equivalent to another type.
kSize kType_StaticSize(kType type)
Gets the size of a type's static data.
Represents a boolean value.
kSize count
Count of values in this field (typically 1; can be higher for "array value" fields, e.g. kText32).
Definition: kType.h:69
kFunction * kType_IVTable(kType type, kType interfaceType)
Gets a pointer to the type's virtual method table corresponding to the specified interface type...
kBool kType_IsBitEnum(kType type)
Reports whether the type is an enumeration bitset.
kFunction deserialize
Deserialization method.
Definition: kType.h:95
kText16 format
Serialization format name (e.g. "kdat6").
Definition: kType.h:91
const kMethodInfo * kType_VMethodInfoAt(kType type, kSize index)
Gets metadata for the virtual method at the specified index.