Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

#define kTypeOf | ( |  | SYMBOL | ) |

Returns the kType object associated with the specified class, interface, or value symbol.

This macro is used to access type information by compile-time symbol name. E.g.

#include <kApi/Data/kImage.h>
void PrintImageTypeInfo()
{
kType type = kTypeOf(kImage);
printf("Type name: %s\n", kType_Name(type));
printf("Base class: %s\n", kType_Name(kType_Base(type)));
}

Use of this macro requires that the header file defining the specified type symbol has been included. For example, kTypeOf(kArrayList) requires inclusion of <kApi/Data/kArrayList.h>.

Parameters

  SYMBOL | Type symbol, such as kArrayList or k32s.

Returns
  kType object representing metadata about the specified type.