Zen API
|
Core Zen type declarations.
Go to the source code of this file.
Macros | |
#define | kAddAbstractVersionEx(TYPE, FORMAT, FORMAT_VER, GUID) |
Within a type definition, indicates that type information can be serialized, but instances cannot. More... | |
#define | kAddDependency(SYMBOL) |
Within an assembly definition, specifies a dependency on another assembly. More... | |
#define | kAddEnumerator |
Within an enumeration type definition, indicates that an enumeration has the specified enumerator. More... | |
#define | kAddField(VALUE, FIELD_TYPE, FIELD) |
Within a structure type definition, indicates that a structure has the specified field. More... | |
#define | kAddFlags(TYPE, FLAGS) |
Adds specific flags to type metadata. More... | |
#define | kAddFrameworkConstructor(SYMBOL, CTOR) |
Within a type definition, indicates that a type has the specified framework constructor. More... | |
#define | kAddInterface(SYMBOL, IFACE) |
Within a type definition, indicates that a type implements the specified interface. More... | |
#define | kAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) |
Within a type definition, indicates that a type implements the specified interface method. More... | |
#define | kAddMethod(SYMBOL, METHOD) |
Within a type definition, indicates that a type has the specified non-virtual method. More... | |
#define | kAddPriority(SYMBOL) |
Within an assembly definition, indicates a requirement on static initialization order. More... | |
#define | kAddPrivateFrameworkConstructor(SYMBOL, CTOR) |
Within a type definition, indicates that a type has the specified default private constructor. More... | |
#define | kAddPrivateIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) |
Within a type definition, indicates that a type implements the specified interface method with a private method. More... | |
#define | kAddPrivateVersionEx(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) |
Within a type definition, indicates that a type has the specified serialization version. More... | |
#define | kAddPrivateVMethod(IN_TYPE, FROM_TYPE, METHOD) |
Within a type definition, indicates that a type overrides the specified virtual method with a private method. More... | |
#define | kAddStatic(SYMBOL) |
Within a type definition, indicates that a type has static data. More... | |
#define | kAddType(SYMBOL) |
Within an assembly definition, adds a type to the assembly. More... | |
#define | kAddVersionEx(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) |
Within a type definition, indicates that a type has the specified serialization version. More... | |
#define | kAddVMethod(IN_TYPE, FROM_TYPE, METHOD) |
Within a type definition, indicates that a type overrides the specified virtual method. More... | |
#define | kAssemblyOf(SYMBOL) |
Returns the kAssembly object associated with the specified assembly symbol. More... | |
#define | kAssert(EXPRESSION) |
Aborts execution if EXPRESSION is kFALSE. More... | |
#define | kAssertType(OBJECT, SYMBOL) |
Aborts execution if the type of the OBJECT argument is not equivalent to kTypeOf(SYMBOL). More... | |
#define | kBeginArrayValue(PREFIX, SYMBOL, TYPE, BASE) |
Starts the definition of an array-based value type. More... | |
#define | kBeginArrayValueEx(PREFIX, SYMBOL, TYPE) |
Starts the definition of an array-based value type. More... | |
#define | kBeginAssembly(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) |
Starts the definition of a type assembly. More... | |
#define | kBeginAssemblyEx(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) |
Starts the definition of a type assembly. More... | |
#define | kBeginClass(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kBeginClassEx(PREFIX, SYMBOL) |
Starts the definition of a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kBeginEnum(PREFIX, SYMBOL, BASE) |
Starts the definition of an enumeration value type. More... | |
#define | kBeginEnumEx(PREFIX, SYMBOL) |
Starts the definition of an enumeration value type. More... | |
#define | kBeginFullClass(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type. More... | |
#define | kBeginFullClassEx(PREFIX, SYMBOL) |
Starts the definition of a class type. More... | |
#define | kBeginInterface(PREFIX, SYMBOL, BASE) |
Starts the definition of an interface type. More... | |
#define | kBeginInterfaceEx(PREFIX, SYMBOL) |
Starts the definition of an interface type. More... | |
#define | kBeginStaticClass(PREFIX, SYMBOL) |
Starts the definition of a class type that has only static data. More... | |
#define | kBeginStaticClassEx(PREFIX, SYMBOL) |
Starts the definition of a class type that has only static data. More... | |
#define | kBeginValue(PREFIX, SYMBOL, BASE) |
Starts the definition of a structure value type. More... | |
#define | kBeginValueEx(PREFIX, SYMBOL) |
Starts the definition of a structure value type. More... | |
#define | kBeginVirtualClass(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type that requires an expanded vtable but does not have static data. More... | |
#define | kBeginVirtualClassEx(PREFIX, SYMBOL) |
Starts the definition of a class type that requires an expanded vtable but does not have static data. More... | |
#define | kCall |
kApi standard function calling convention. | |
#define | kCast(TYPE, ITEM) |
Casts the ITEM argument to the specified TYPE. More... | |
#define | kCastClass_(TYPE, OBJECT) |
Type-checks the specified object before returning a class-typed pointer to its implementation. More... | |
#define | kCastIVTable_(IFACE, OBJECT) |
Gets an interface virtual table pointer for the specified object. More... | |
#define | kCastVTable_(TYPE, OBJECT) |
Gets a virtual table pointer for the specified object. More... | |
#define | kCatch(STATUS_POINTER) |
Closes a kTry block and opens a kCatch error-handling block. More... | |
#define | kCatchEx(STATUS_POINTER) |
Closes a kTry block and opens a kCatchEx error-handling block. More... | |
#define | kCheck(EXPRESSION) |
Executes a return statement if the given expression is not kOK. More... | |
#define | kCheckArgs(EXPRESSION) |
Executes a return statement if the given expression is not kTRUE. More... | |
#define | kCheckState(EXPRESSION) |
Executes a return statement if the given expression is not kTRUE. More... | |
#define | kCheckTrue(EXPRESSION, STATUS) |
Executes a return statement if the given expression is kFALSE. More... | |
#define | kDebugBreak() |
Triggers a software breakpoint. More... | |
#define | kDeclareArrayValue(PREFIX, SYMBOL, BASE) |
Declares type information for an array-based value type. More... | |
#define | kDeclareArrayValueEx(PREFIX, SYMBOL, BASE) |
Declares type information for an array-based value type. More... | |
#define | kDeclareAssembly(PREFIX, SYMBOL) |
Declares a type assembly. More... | |
#define | kDeclareAssemblyEx(PREFIX, SYMBOL) |
Declares a type assembly. More... | |
#define | kDeclareClass(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kDeclareClassEx(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kDeclareEnum(PREFIX, SYMBOL, BASE) |
Declares type information for an enumeration value type. More... | |
#define | kDeclareEnumEx(PREFIX, SYMBOL, BASE) |
Declares type information for an enumeration value type. More... | |
#define | kDeclareFullClass(PREFIX, SYMBOL, BASE) |
Declares type information for a class type. More... | |
#define | kDeclareFullClassEx(PREFIX, SYMBOL, BASE) |
Declares type information for a class type. More... | |
#define | kDeclareInterface(PREFIX, SYMBOL, BASE) |
Declares type information for an interface type. More... | |
#define | kDeclareInterfaceEx(PREFIX, SYMBOL, BASE) |
Declares type information for an interface type. More... | |
#define | kDeclareStaticClass(PREFIX, SYMBOL) |
Declares type information for a class type that has only static data. More... | |
#define | kDeclareStaticClassEx(PREFIX, SYMBOL) |
Declares type information for a class type that has only static data. More... | |
#define | kDeclareValue(PREFIX, SYMBOL, BASE) |
Declares type information for a structure value type. More... | |
#define | kDeclareValueEx(PREFIX, SYMBOL, BASE) |
Declares type information for a structure value type. More... | |
#define | kDeclareVirtualClass(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that requires an expanded vtable but does not have static data. More... | |
#define | kDeclareVirtualClassEx(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that requires an expanded vtable but does not have static data. More... | |
#define | kDefineDebugHints() |
The kDefineDebugHints macro can be helpful when attempting to use debug expressions to peek inside kApi class implementations in Visual Studio. More... | |
#define | kDeprecate(SYMBOL) |
Adds a deprecation warning for the specified symbol. More... | |
#define | kDlCall |
kApi dynamic load function calling convention. | |
#define | kEndArrayValue() |
Ends the definition of an array-based value type. More... | |
#define | kEndArrayValueEx() |
Ends the definition of an array-based value type. More... | |
#define | kEndAssembly() |
Ends the definition of a type assembly. More... | |
#define | kEndAssemblyEx() |
Ends the definition of a type assembly. More... | |
#define | kEndCatch(STATUS) |
Closes a kCatch block. More... | |
#define | kEndCatchEx(STATUS) |
Closes a kCatchEx block. More... | |
#define | kEndClass() |
Ends the definition of a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kEndClassEx() |
Ends the definition of a class type that does not require an expanded vtable and does not have static data. More... | |
#define | kEndEnum() |
Ends the definition of an enumeration value type. More... | |
#define | kEndEnumEx() |
Ends the definition of an enumeration value type. More... | |
#define | kEndFinally() |
Closes a kFinally block. More... | |
#define | kEndFinallyEx() |
Closes a kFinallyEx block. More... | |
#define | kEndFullClass() |
Ends the definition of a class type. More... | |
#define | kEndFullClassEx() |
Ends the definition of a class type. More... | |
#define | kEndInterface() |
Ends the definition of an interface type. More... | |
#define | kEndInterfaceEx() |
Ends the definition of an interface type. More... | |
#define | kEndStaticClass() |
Ends the definition of a class type that has only static data. More... | |
#define | kEndStaticClassEx() |
Ends the definition of a class type that has only static data. More... | |
#define | kEndValue() |
Ends the definition of a structure value type. More... | |
#define | kEndValueEx() |
Ends the definition of a structure value type. More... | |
#define | kEndVirtualClass() |
Ends the definition of a class type that requires an expanded vtable but does not have static data. More... | |
#define | kEndVirtualClassEx() |
Ends the definition of a class type that requires an expanded vtable but does not have static data. More... | |
#define | kFinally |
Closes a kTry block and opens a kFinally block. More... | |
#define | kFinallyEx |
Opens a kFinallyEx block. More... | |
#define | kInlineFx(TYPE) |
Inline method declaration helper. | |
#define | kNULL |
Null pointer. | |
#define | kObj(TypeName_T, T_object) |
Declares a local "obj" (this-pointer) variable and initializes it from a type-checked object handle. More... | |
#define | kObjN(TypeName_T, VarName_obj, T_object) |
Declares a local this-pointer variable with a specified name and initializes it from a type-checked object handle. More... | |
#define | kObjNR(TypeName_T, VarName_obj, T_object) |
Declares a local this-pointer variable with a specified name and initializes it from an object handle, without type-checking. More... | |
#define | kObjR(TypeName_T, T_object) |
Declares a local "obj" (this-pointer) variable and initializes it from an object handle, without type-checking. More... | |
#define | kPoint3d_Init_(POINT, X, Y, Z) |
Initializes a 3d point structure. More... | |
#define | kPoint4d_Init_(POINT, X, Y, Z, W) |
Initializes a 4d point structure. More... | |
#define | kPoint_Init_(POINT, X, Y) |
Initializes a point structure. More... | |
#define | kRect3d_Init_(RECT, X, Y, Z, W, H, D) |
Initializes a rectangular cuboid structure. More... | |
#define | kRect_Init_(RECT, X, Y, W, H) |
Initializes a rectangle structure. More... | |
#define | kRotatedRect_Init_(RECT, XC, YC, W, H, A) |
Initializes a rotated rectangle structure. More... | |
#define | kStaticObj(TypeName_T) |
Declares a local "sobj" (static object) pointer variable and initializes it. More... | |
#define | kStaticOf(SYMBOL) |
Returns static data associated with the specified class symbol. More... | |
#define | kTest(EXPRESSION) |
Used within a kTry block to conditionally jump to the first error handling block (e.g. More... | |
#define | kTestArgs(EXPRESSION) |
Within a kTry block, throws kERROR_PARAMETER if the expression result is not kTRUE. More... | |
#define | kTestState(EXPRESSION) |
Within a kTry block, throws kERROR_STATE if the expression result is kFALSE. More... | |
#define | kTestTrue(EXPRESSION, STATUS) |
Within a kTry block, throws STATUS if the expression result is kFALSE. More... | |
#define | kThrow(EXPRESSION) |
Used within a kTry block to jump to the first error handling block (e.g. More... | |
#define | kTrace(TAG) |
Generates a trace event using the given tag (string literals only). More... | |
#define | kTry |
Opens a kTry error-checking block. More... | |
#define | kTypeOf(SYMBOL) |
Returns the kType object associated with the specified class, interface, or value symbol. More... | |
#define | kWarn(MESSAGE) |
Emits a custom compile-time warning message. More... | |
#define | kZero(VALUE) |
Sets all bits of a structure to zero. More... | |
Typedefs | |
typedef kStatus(kCall * | kCallbackFx )(kPointer receiver, kPointer sender, void *args) |
Callback signature for a generic event handler. More... | |
typedef kBool(kCall * | kEqualsFx )(const void *item1, const void *item2) |
Callback signature to determine equality of two items. More... | |
typedef kStatus(kCall * | kFrameworkConstructorFx )(kObject *object, kAlloc allocator) |
Required signature for kObject framework constructors. | |
typedef void(kCall * | kFunction )() |
Generic pointer to function. | |
typedef kSize(kCall * | kHashFx )(const void *item) |
Callback signature to determine hash code of an item. More... | |
Functions | |
template<typename T > | |
static kInline std::enable_if < std::is_unsigned< T >::value, T >::type | kAbs (const T &v) |
Returns the absolute value of an unsigned number. More... | |
template<typename T > | |
static kInline std::enable_if <!std::is_unsigned< T >::value, T >::type | kAbs (const T &v) |
Returns the absolute value of a signed number. More... | |
template<typename T > | |
T | kAdjustCeil (const T &value, const T &min, const T &max, const T &granularity) |
Rounds the specified input up, conforming to minimum, maximum, and granularity constraints. More... | |
template<typename T > | |
T | kAdjustFloor (const T &value, const T &min, const T &max, const T &granularity) |
Rounds the specified input down, conforming to minimum, maximum, and granularity constraints. More... | |
template<typename T > | |
T | kClamp (const T &v, const T &min, const T &max) |
Returns a value limited to the specified range. More... | |
template<typename T > | |
static kInline std::enable_if < std::is_unsigned< T >::value, T >::type | kDivideCeil (const T &a, const T &b) |
Calculates the quotient of two unsigned integers, rounding up. More... | |
template<typename T > | |
static kInline std::enable_if <!std::is_unsigned< T >::value, T >::type | kDivideCeil (const T &a, const T &b) |
Calculates the quotient of two signed integers, rounding up. More... | |
template<typename T > | |
static kInline std::enable_if < std::is_unsigned< T >::value, T >::type | kDivideFloor (const T &a, const T &b) |
Calculates the quotient of two unsigned integers, rounding down. More... | |
template<typename T > | |
static kInline std::enable_if <!std::is_unsigned< T >::value, T >::type | kDivideFloor (const T &a, const T &b) |
Calculates the quotient of two signed integers, rounding down. More... | |
kBool | kEndianness_ShouldReverse (kEndianness endianness) |
Reports whether byte ordering must be reversed to be consistent with the current platform. More... | |
kBool | kIsError (kStatus status) |
Returns kTRUE if the given status value is not kOK. More... | |
void | kItemCopy (void *dest, const void *src, kSize size) |
Performs a small copy with minimal overhead. More... | |
void | kItemZero (void *dest, kSize size) |
Zero-initializes a small amount of memory with minimal overhead. More... | |
template<typename T > | |
T | kMax (const T &a, const T &b) |
Returns the maximum of two numbers. More... | |
template<typename T > | |
T | kMin (const T &a, const T &b) |
Returns the minimum of two numbers. More... | |
template<typename T > | |
T | kQuantizeCeil (const T &value, const T &granularity) |
Rounds the specified input value up to the nearest multiple of the specified granularity. More... | |
template<typename T > | |
T | kQuantizeFloor (const T &value, const T &granularity) |
Rounds the specified input value down to the nearest multiple of the specified granularity. More... | |
template<typename T > | |
static kInline std::enable_if < std::is_unsigned< T >::value, T >::type | kSign (const T &v) |
Returns the sign of an unsigned number. More... | |
template<typename T > | |
static kInline std::enable_if <!std::is_unsigned< T >::value, T >::type | kSign (const T &v) |
Returns the sign of a signed number. More... | |
kBool | kSuccess (kStatus status) |
Returns kTRUE if the given expression value is kOK. More... | |