|
Zen API
|
Essential API declarations.
Go to the source code of this file.
Macros | |
| #define | k16S_MAX (32767) |
| k16s maximum value. | |
| #define | k16S_MIN (-k16S_MAX -1) |
| k16s minimum value. | |
| #define | k16S_NULL (k16S_MIN) |
| k16s invalid value. | |
| #define | k16U_MAX (65535U) |
| k16u maximum value. | |
| #define | k16U_MIN (0) |
| k16u minimum value. | |
| #define | k16U_NULL (k16U_MAX) |
| k16u invalid value. | |
| #define | k32F_MAX (3.402823466e+38F) |
| k32f largest positive value. | |
| #define | k32F_MIN (1.175494351e-38F) |
| k32f smallest positive value. | |
| #define | k32F_NULL (-k32F_MAX) |
| k32f invalid value. | |
| #define | k32S_MAX (2147483647) |
| k32s maximum value. | |
| #define | k32S_MIN (-k32S_MAX -1) |
| k32s minimum value. | |
| #define | k32S_NULL (k32S_MIN) |
| k32s invalid value. | |
| #define | k32U_MAX (4294967295U) |
| k32u maximum value. | |
| #define | k32U_MIN (0) |
| k32u minimum value. | |
| #define | k32U_NULL (k32U_MAX) |
| k32u invalid value. | |
| #define | k64F_MAX (1.7976931348623157e+308) |
| k64f largest positive value. | |
| #define | k64F_MIN (2.2250738585072014e-308) |
| k64f smallest positive value. | |
| #define | k64F_NULL (-k64F_MAX) |
| k64f invalid value. | |
| #define | k64S(CONST) kx64S(CONST) |
| Declares a 64-bit signed integer literal. | |
| #define | k64S_MAX k64S(9223372036854775807) |
| k64s maximum value. | |
| #define | k64S_MIN (-k64S_MAX -1) |
| k64s minimum value. | |
| #define | k64S_NULL (k64S_MIN) |
| k64s invalid value. | |
| #define | k64U(CONST) kx64U(CONST) |
| Declares a 64-bit unsigned integer literal. | |
| #define | k64U_MAX k64U(18446744073709551615) |
| k64u maximum value. | |
| #define | k64U_MIN k64U(0) |
| k64u minimum value. | |
| #define | k64U_NULL (k64U_MAX) |
| k64u invalid value. | |
| #define | k8S_MAX (127) |
| k8s maximum value. | |
| #define | k8S_MIN (-k8S_MAX -1) |
| k8s minimum value. | |
| #define | k8S_NULL (k8S_MIN) |
| k8s invalid value. | |
| #define | k8U_MAX (255U) |
| k8u maximum value. | |
| #define | k8U_MIN (0) |
| k8u minimum value. | |
| #define | k8U_NULL (k8U_MAX) |
| k8u invalid value. | |
| #define | kAbs_(A) kxAbs_(A) |
| Returns the absolute value of a number. More... | |
| #define | kAddDependency(SYMBOL) kAddDependency_(SYMBOL) |
| Within an assembly definition, specifies a dependency on another assembly. More... | |
| #define | kAddEnumerator(VALUE, ENUMERATOR) kAddEnumerator_(VALUE, ENUMERATOR) |
| Within an enumeration type definition, indicates that an enumeration has the specified enumerator. More... | |
| #define | kAddField(VALUE, FIELD_TYPE, FIELD) kAddField_(VALUE, FIELD_TYPE, FIELD) |
| Within a structure type definition, indicates that a structure has the specified field. More... | |
| #define | kAddFlags(TYPE, FLAGS) kAddFlags_(TYPE, FLAGS) |
| Adds specific flags to type metadata. More... | |
| #define | kAddInterface(SYMBOL, IFACE) kAddInterface_(SYMBOL, IFACE) |
| Within a type definition, indicates that a type implements the specified interface. More... | |
| #define | kAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) 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) kAddMethod_(SYMBOL, METHOD) |
| Within a type definition, indicates that a type has the specified non-virtual method. More... | |
| #define | kAddPriority(SYMBOL) kAddPriority_(SYMBOL) |
| Within an assembly definition, indicates a requirement on static initialization order. More... | |
| #define | kAddType(SYMBOL) kAddType_(SYMBOL) |
| Within an assembly definition, adds a type to the assembly. More... | |
| #define | kAddVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) kAddVersion_(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) kAddVMethod_(IN_TYPE, FROM_TYPE, METHOD) |
| Within a type definition, indicates that a type overrides the specified virtual method. More... | |
| #define | kArgb_Init_(ARGB, A, R, G, B) kxArgb_Init_(ARGB, A, R, G, B) |
| Initializes a kArgb structure. More... | |
| #define | kAssemblyOf(SYMBOL) kAssemblyOf_(SYMBOL) |
| Returns the kAssembly object associated with the specified assembly symbol. More... | |
| #define | kAssert(EXPRESSION) kAssert_(EXPRESSION) |
| Aborts execution if EXPRESSION is kFALSE. More... | |
| #define | kAssertType(OBJECT, SYMBOL) 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) kBeginArrayValue_(PREFIX, SYMBOL, TYPE, BASE) |
| Starts the definition of an array-based value type. More... | |
| #define | kBeginAssembly(PREFIX, SYMBOL, VERSION) kBeginAssembly_(PREFIX, SYMBOL, VERSION) |
| Starts the definition of a type assembly. More... | |
| #define | kBeginBitEnum(PREFIX, SYMBOL, BASE) kBeginBitEnum_(PREFIX, SYMBOL, BASE) |
| Starts the definition of a bit-flag enumeration value type. More... | |
| #define | kBeginClass(PREFIX, SYMBOL, BASE) 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 | kBeginEnum(PREFIX, SYMBOL, BASE) kBeginEnum_(PREFIX, SYMBOL, BASE) |
| Starts the definition of an enumeration value type. More... | |
| #define | kBeginFullClass(PREFIX, SYMBOL, BASE) kBeginFullClass_(PREFIX, SYMBOL, BASE) |
| Starts the definition of a class type. More... | |
| #define | kBeginInterface(PREFIX, SYMBOL, BASE) kBeginInterface_(PREFIX, SYMBOL, BASE) |
| Starts the definition of an interface type. More... | |
| #define | kBeginStaticClass(PREFIX, SYMBOL) kBeginStaticClass_(PREFIX, SYMBOL) |
| Starts the definition of a class type that has only static data. More... | |
| #define | kBeginValue(PREFIX, SYMBOL, BASE) kBeginValue_(PREFIX, SYMBOL, BASE) |
| Starts the definition of a structure value type. More... | |
| #define | kBeginVirtualClass(PREFIX, SYMBOL, BASE) kBeginVirtualClass_(PREFIX, SYMBOL, BASE) |
| Starts the definition of a class type that requires an expanded vtable but does not have static data. More... | |
| #define | kCall kxCall |
| kApi standard function calling convention. | |
| #define | kCast(TYPE, ITEM) kCast_(TYPE, ITEM) |
| Casts the ITEM argument to the specified TYPE. More... | |
| #define | kCatch(STATUS_POINTER) kCatch_(STATUS_POINTER) |
| Closes a kTry block and opens a kCatch error-handling block. More... | |
| #define | kCatchEx(STATUS_POINTER) kCatchEx_(STATUS_POINTER) |
| Closes a kTry block and opens a kCatchEx error-handling block. More... | |
| #define | kCFA_BAYER_BGGR (1) |
| Bayer filter: BG/GR. | |
| #define | kCFA_BAYER_GBRG (2) |
| Bayer filter: GB/RG. | |
| #define | kCFA_BAYER_GRBG (4) |
| Bayer filter: GR/BG. | |
| #define | kCFA_BAYER_RGGB (3) |
| Bayer filter: RG/GB. | |
| #define | kCFA_NONE (0) |
| No color filter. | |
| #define | kCheck(EXPRESSION) kCheck_(EXPRESSION) |
| Executes a return statement if the given expression is not kOK. More... | |
| #define | kCheckArgs(EXPRESSION) kCheckArgs_(EXPRESSION) |
| Executes a return statement if the given expression is not kTRUE. More... | |
| #define | kCheckState(EXPRESSION) kCheckState_(EXPRESSION) |
| Executes a return statement if the given expression is not kTRUE. More... | |
| #define | kClamp_(V, VMIN, VMAX) kxClamp_((V), (VMIN), (VMAX)) |
| Returns a value limited to the specified range. More... | |
| #define | kCOMPARISON_EQ (0) |
| Is equal. | |
| #define | kCOMPARISON_GT (4) |
| Is greater than. | |
| #define | kCOMPARISON_GTE (5) |
| Is greater than or equal. | |
| #define | kCOMPARISON_LT (2) |
| Is less than. | |
| #define | kCOMPARISON_LTE (3) |
| Is less than or equal. | |
| #define | kCOMPARISON_NEQ (1) |
| Is not equal. | |
| #define | kCountOf(CARRAY) kCountOf_(CARRAY) |
| Returns the number of elements in a C array. More... | |
| #define | kDeclareArrayValue(PREFIX, SYMBOL, BASE) kDeclareArrayValue_(PREFIX, SYMBOL, BASE) |
| Declares type information for an array-based value type. More... | |
| #define | kDeclareAssembly(PREFIX, SYMBOL) kDeclareAssembly_(PREFIX, SYMBOL) |
| Declares a type assembly. More... | |
| #define | kDeclareBitEnum(PREFIX, SYMBOL, BASE) kDeclareBitEnum_(PREFIX, SYMBOL, BASE) |
| Declares type information for a bit-flag enumeration value type. More... | |
| #define | kDeclareClass(PREFIX, SYMBOL, BASE) 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 | kDeclareEnum(PREFIX, SYMBOL, BASE) kDeclareEnum_(PREFIX, SYMBOL, BASE) |
| Declares type information for an enumeration value type. More... | |
| #define | kDeclareFullClass(PREFIX, SYMBOL, BASE) kDeclareFullClass_(PREFIX, SYMBOL, BASE) |
| Declares type information for a class type. More... | |
| #define | kDeclareInterface(PREFIX, SYMBOL, BASE) kDeclareInterface_(PREFIX, SYMBOL, BASE) |
| Declares type information for an interface type. More... | |
| #define | kDeclareStaticClass(PREFIX, SYMBOL) kDeclareStaticClass_(PREFIX, SYMBOL) |
| Declares type information for a class type that has only static data. More... | |
| #define | kDeclareValue(PREFIX, SYMBOL, BASE) kDeclareValue_(PREFIX, SYMBOL, BASE) |
| Declares type information for a structure value type. More... | |
| #define | kDeclareVirtualClass(PREFIX, SYMBOL, BASE) kDeclareVirtualClass_(PREFIX, SYMBOL, BASE) |
| Declares type information for a class type that requires an expanded vtable but does not have static data. More... | |
| #define | kDlCall kxDlCall |
| kApi dynamic load function calling convention. | |
| #define | kEndArrayValue() kEndArrayValue_() |
| Ends the definition of an array-based value type. More... | |
| #define | kEndAssembly() kEndAssembly_() |
| Ends the definition of a type assembly. More... | |
| #define | kEndBitEnum() kEndBitEnum_() |
| Ends the definition of a bit-flag enumeration value type. More... | |
| #define | kEndCatch(STATUS) kEndCatch_(STATUS) |
| Closes a kCatch block. More... | |
| #define | kEndCatchEx(STATUS) kEndCatchEx_(STATUS) |
| Closes a kCatchEx block. More... | |
| #define | kEndClass() kEndClass_() |
| Ends the definition of a class type that does not require an expanded vtable and does not have static data. More... | |
| #define | kEndEnum() kEndEnum_() |
| Ends the definition of an enumeration value type. More... | |
| #define | kEndFinally() kEndFinally_() |
| Closes a kFinally block. More... | |
| #define | kEndFinallyEx() kEndFinallyEx_() |
| Closes a kFinallyEx block. More... | |
| #define | kEndFullClass() kEndFullClass_() |
| Ends the definition of a class type. More... | |
| #define | kEndInterface() kEndInterface_() |
| Ends the definition of an interface type. More... | |
| #define | kEndStaticClass() kEndStaticClass_() |
| Ends the definition of a class type that has only static data. More... | |
| #define | kEndValue() kEndValue_() |
| Ends the definition of a structure value type. More... | |
| #define | kEndVirtualClass() kEndVirtualClass_() |
| Ends the definition of a class type that requires an expanded vtable but does not have static data. More... | |
| #define | kERROR (0) |
| General error. | |
| #define | kERROR_ABORT (-988) |
| Operation aborted. | |
| #define | kERROR_ALREADY_EXISTS (-987) |
| Conflicts with existing item. | |
| #define | kERROR_BUSY (-981) |
| Agent is busy (cannot service request). | |
| #define | kERROR_CLOSED (-990) |
| Resource is no longer available. | |
| #define | kERROR_COMMAND (-998) |
| Command not recognized. | |
| #define | kERROR_CONFLICT (-980) |
| State conflicts with another object. | |
| #define | kERROR_DEVICE (-978) |
| Hardware device error. | |
| #define | kERROR_FORMAT (-984) |
| Data parsing/formatting error. | |
| #define | kERROR_FULL (-977) |
| Resource is already fully utilized. | |
| #define | kERROR_HEAP (-985) |
| Heap error (leak/double-free). | |
| #define | kERROR_IN_PROGRESS (-976) |
| Operation is in progress, but not yet complete. | |
| #define | kERROR_INCOMPLETE (-992) |
| Buffer insufficient for data. | |
| #define | kERROR_MEMORY (-994) |
| Out of memory. | |
| #define | kERROR_NETWORK (-986) |
| Network setup/resource error. | |
| #define | kERROR_NOT_FOUND (-999) |
| Item is not found. | |
| #define | kERROR_OS (-979) |
| Generic error reported by underlying OS. | |
| #define | kERROR_PARAMETER (-997) |
| Parameter is invalid. | |
| #define | kERROR_READ_ONLY (-983) |
| Object is read-only (cannot be written). | |
| #define | kERROR_STATE (-1000) |
| Invalid state. | |
| #define | kERROR_STREAM (-991) |
| Error in stream. | |
| #define | kERROR_TIMEOUT (-993) |
| Action timed out. | |
| #define | kERROR_UNIMPLEMENTED (-996) |
| Feature not implemented. | |
| #define | kERROR_VERSION (-989) |
| Incompatible version. | |
| #define | kERROR_WRITE_ONLY (-982) |
| Object is write-only (cannot be read). | |
| #define | kFALSE (0) |
| Boolean false. | |
| #define | kFILE_MODE_READ (0x1) |
| Open the file with permission to read. | |
| #define | kFILE_MODE_UPDATE (0x4) |
| Preserve contents when opened for writing. | |
| #define | kFILE_MODE_WRITE (0x2) |
| Open the file with permission to write. | |
| #define | kFinally kFinally_ |
| Closes a kTry block and opens a kFinally block. More... | |
| #define | kFinallyEx kFinallyEx_ |
| Opens a kFinallyEx block. More... | |
| #define | kINFINITE k64U_MAX |
| Infinity (used for k64u timeouts). | |
| #define | kIsError(EXPRESSION) kIsError_(EXPRESSION) |
| Returns kTRUE if the given status value is not kOK. More... | |
| #define | kIsNull(POINTER) kIsNull_(POINTER) |
| Tests for equality with null pointer. More... | |
| #define | kItemAt_(BASE, INDEX, SIZE) kAt_((BASE), (INDEX)*(SIZE)) |
| Gets a pointer to the Nth element of an array. More... | |
| #define | kItemCopy_(DEST, SRC, SIZE) kxItemCopy_(DEST, SRC, SIZE) |
| Performs a small copy with minimal overhead. More... | |
| #define | kItemSet_(DEST, FILL, SIZE) kxItemSet_(DEST, FILL, SIZE) |
| Performs a small fill with minimal overhead. More... | |
| #define | kItemZero_(DEST, SIZE) kItemSet_(DEST, 0, SIZE) |
| Zero-initializes a small amount of memory with minimal overhead. More... | |
| #define | kMax_(A, B) kxMax_(A, B) |
| Returns the maximum of two numbers. More... | |
| #define | kMin_(A, B) kxMin_(A, B) |
| Returns the minimum of two numbers. More... | |
| #define | kNULL (0) |
| Null pointer. | |
| #define | kOK (1) |
| Operation successful. | |
| #define | kPIXEL_FORMAT_8BPC_BGRX (3) |
| 8-bits-per-channel color with 4 channels (blue/green/red/unused)(kRgb) | |
| #define | kPIXEL_FORMAT_8BPP_CFA (2) |
| 8-bit color filter array (k8u) | |
| #define | kPIXEL_FORMAT_8BPP_GREYSCALE (1) |
| 8-bit greyscale (k8u) | |
| #define | kPIXEL_FORMAT_NULL (0) |
| Unknown pixel format. | |
| #define | kPoint3d_Init_(POINT, X, Y, Z) kxPoint3d_Init_(POINT, X, Y, Z) |
| Initializes a 3d point structure. More... | |
| #define | kPoint_Init_(POINT, X, Y) kxPoint_Init_(POINT, X, Y) |
| Initializes a point structure. More... | |
| #define | kRect_Init_(RECT, X, Y, W, H) kxRect_Init_(RECT, X, Y, W, H) |
| Initializes a rectangle structure. More... | |
| #define | kRgb_Init_(RGB, R, G, B) kxRgb_Init_(RGB, R, G, B) |
| Initializes a kRgb structure. More... | |
| #define | kRotatedRect_Init_(RECT, XC, YC, W, H, A) kxRotatedRect_Init_(RECT, XC, YC, W, H, A) |
| Initializes a rotated rectangle structure. More... | |
| #define | kSEEK_ORIGIN_BEGIN (0) |
| Seek relative to the start of stream. | |
| #define | kSEEK_ORIGIN_CURRENT (1) |
| Seek relative to the current position. | |
| #define | kSEEK_ORIGIN_END (2) |
| Seek relative to the end of stream. | |
| #define | kSIZE_MAX kxSIZE_MAX |
| Maximum value contained by kSize. | |
| #define | kSIZE_NULL kSIZE_MAX |
| Invalid size value. | |
| #define | kSSIZE_MAX kxSSIZE_MAX |
| Maximum value contained by kSSize. | |
| #define | kSSIZE_MIN kxSSIZE_MIN |
| Minimum value contained by kSSize. | |
| #define | kSSIZE_NULL kSSIZE_MIN |
| Invalid kSSize value. | |
| #define | kStaticInitialized(SYMBOL) kStaticInitialized_(SYMBOL) |
| Indicates whether static initialization has completed for the specified type symbol. More... | |
| #define | kStaticOf(SYMBOL) kStaticOf_(SYMBOL) |
| Returns static data associated with the specified class symbol. More... | |
| #define | kSuccess(EXPRESSION) kSuccess_(EXPRESSION) |
| Returns kTRUE if the given expression value is kOK. More... | |
| #define | kTest(EXPRESSION) kTest_(EXPRESSION) |
| Used within a kTry block to conditionally jump to the first error handling block (e.g. More... | |
| #define | kTestArgs(EXPRESSION) kTestArgs_(EXPRESSION) |
| Within a kTry block, throws kERROR_PARAMETER if the expression result is kFALSE. More... | |
| #define | kTestState(EXPRESSION) kTestState_(EXPRESSION) |
| Within a kTry block, throws kERROR_STATE if the expression result is kFALSE. More... | |
| #define | kThrow(EXPRESSION) kThrow_(EXPRESSION) |
| Used within a kTry block to jump to the first error handling block (e.g. More... | |
| #define | kTrace(TAG) kTrace_(TAG) |
| Generates a trace event using the given tag (string literals only). More... | |
| #define | kTRUE (1) |
| Boolean true. | |
| #define | kTry kTry_ |
| Opens a kTry error-checking block. More... | |
| #define | kTypeOf(SYMBOL) kTypeOf_(SYMBOL) |
| Returns the kType object associated with the specified class, interface, or value symbol. More... | |
| #define | kZero_(VALUE) kxZero_(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 void(kCall * | kFunction )() |
| Generic pointer to function. | |
| typedef kSize(kCall * | kHashFx )(const void *item) |
| Callback signature to determine hash code of an item. More... | |
| #define kAbs_ | ( | A | ) | kxAbs_(A) |
Returns the absolute value of a number.
| A | Input value. |
| #define kAddDependency | ( | SYMBOL | ) | kAddDependency_(SYMBOL) |
Within an assembly definition, specifies a dependency on another assembly.
| SYMBOL | Dependency target (e.g. kApi). |
| #define kAddEnumerator | ( | VALUE, | |
| ENUMERATOR | |||
| ) | kAddEnumerator_(VALUE, ENUMERATOR) |
Within an enumeration type definition, indicates that an enumeration has the specified enumerator.
| VALUE | Enumeration type (e.g. kStatus). |
| ENUMERATOR | Enumerator(e.g. kERROR). |
| #define kAddField | ( | VALUE, | |
| FIELD_TYPE, | |||
| FIELD | |||
| ) | kAddField_(VALUE, FIELD_TYPE, FIELD) |
Within a structure type definition, indicates that a structure has the specified field.
| VALUE | Structure type (e.g. kPoint32s). |
| FIELD_TYPE | Field type (e.g. k32s). |
| FIELD | Field name (e.g. x). |
| #define kAddFlags | ( | TYPE, | |
| FLAGS | |||
| ) | kAddFlags_(TYPE, FLAGS) |
Adds specific flags to type metadata.
| TYPE | Type (e.g. kObject). |
| FLAGS | Type flags (e.g. kTYPE_FLAGS_ABSTRACT). |
| #define kAddInterface | ( | SYMBOL, | |
| IFACE | |||
| ) | kAddInterface_(SYMBOL, IFACE) |
Within a type definition, indicates that a type implements the specified interface.
| SYMBOL | Type symbol (e.g. kArrayList). |
| IFACE | Interface symbol (e.g. kCollection). |
| #define kAddIVMethod | ( | IN_TYPE, | |
| FROM_IFACE, | |||
| IMETHOD, | |||
| CMETHOD | |||
| ) | kAddIVMethod_(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) |
Within a type definition, indicates that a type implements the specified interface method.
| IN_TYPE | Overriding type (e.g. kArrayList). |
| FROM_IFACE | Overridden interface (e.g. kCollection). |
| IMETHOD | Interface method name (e.g. VGetIterator). |
| CMETHOD | Type method name (e.g. GetIterator). |
| #define kAddMethod | ( | SYMBOL, | |
| METHOD | |||
| ) | kAddMethod_(SYMBOL, METHOD) |
Within a type definition, indicates that a type has the specified non-virtual method.
| SYMBOL | Type symbol (e.g. kArrayList). |
| METHOD | Method name (e.g. Remove). |
| #define kAddPriority | ( | SYMBOL | ) | kAddPriority_(SYMBOL) |
Within an assembly definition, indicates a requirement on static initialization order.
The order of kAddPriority statements within an assembly definition determines the order in which types will be initialized. If initialization priorities are not given, types can be initialized in any order.
| SYMBOL | Type symbol (e.g. kArrayList). |
| #define kAddType | ( | SYMBOL | ) | kAddType_(SYMBOL) |
Within an assembly definition, adds a type to the assembly.
| SYMBOL | Type symbol (e.g. kArrayList). |
| #define kAddVersion | ( | TYPE, | |
| FORMAT, | |||
| FORMAT_VER, | |||
| GUID, | |||
| WRITE_METHOD, | |||
| READ_METHOD | |||
| ) | kAddVersion_(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) |
Within a type definition, indicates that a type has the specified serialization version.
| TYPE | Type symbol (e.g. kArrayList). |
| FORMAT | Serialization format name string (e.g. "kdat6"). |
| FORMAT_VER | Serialization format version string (e.g. "5.7.1.0"). |
| GUID | Type identifier string within serialization format (e.g. "kArrayList-0"). |
| WRITE_METHOD | Serialization write method (e.g. WriteDat6V0). |
| READ_METHOD | Serialization read method (e.g. ReadDat6V0). |
| #define kAddVMethod | ( | IN_TYPE, | |
| FROM_TYPE, | |||
| METHOD | |||
| ) | kAddVMethod_(IN_TYPE, FROM_TYPE, METHOD) |
Within a type definition, indicates that a type overrides the specified virtual method.
| IN_TYPE | Overriding type (e.g. kArrayList). |
| FROM_TYPE | Overridden type (e.g. kObject). |
| METHOD | Method name (e.g. VRelease). |
| #define kArgb_Init_ | ( | ARGB, | |
| A, | |||
| R, | |||
| G, | |||
| B | |||
| ) | kxArgb_Init_(ARGB, A, R, G, B) |
| #define kAssemblyOf | ( | SYMBOL | ) | kAssemblyOf_(SYMBOL) |
Returns the kAssembly object associated with the specified assembly symbol.
This macro is used to access assembly information by compile-time symbol name. E.g.
Use of this macro requires that the header file defining the specified assembly symbol has been included. For example, kAssemblyOf(kApiLib) requires inclusion of <kApi/kApiLib.h>
| SYMBOL | Assembly symbol, such as kApiLib. |
| #define kAssert | ( | EXPRESSION | ) | kAssert_(EXPRESSION) |
Aborts execution if EXPRESSION is kFALSE.
kAssert statements are omitted if neither K_DEBUG nor K_ASSERT is defined.
| EXPRESSION | Expression that evaluates to a kBool value. |
| #define kAssertType | ( | OBJECT, | |
| SYMBOL | |||
| ) | kAssertType_(OBJECT, SYMBOL) |
Aborts execution if the type of the OBJECT argument is not equivalent to kTypeOf(SYMBOL).
Type is equivalence is determined using kObject_Is.
kAssertType statements are omitted if neither K_DEBUG nor K_ASSERT is defined.
| OBJECT | Expression that evaluates to a kType value. |
| SYMBOL | Type symbol, such as kArrayList. |
| #define kBeginArrayValue | ( | PREFIX, | |
| SYMBOL, | |||
| TYPE, | |||
| BASE | |||
| ) | kBeginArrayValue_(PREFIX, SYMBOL, TYPE, BASE) |
Starts the definition of an array-based value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kText32). |
| TYPE | Array element type symbol(e.g. kChar). |
| BASE | Value base symbol (typically kValue). |
| #define kBeginAssembly | ( | PREFIX, | |
| SYMBOL, | |||
| VERSION | |||
| ) | kBeginAssembly_(PREFIX, SYMBOL, VERSION) |
Starts the definition of a type assembly.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Assembly symbol name (e.g. kApi). |
| VERSION | Assembly version string (e.g. "6.0.0.0"). |
| #define kBeginBitEnum | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginBitEnum_(PREFIX, SYMBOL, BASE) |
Starts the definition of a bit-flag enumeration value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kFileMode). |
| BASE | Value base symbol (typically kValue). |
| #define kBeginClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginClass_(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type that does not require an expanded vtable and does not have static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kArrayList). |
| BASE | Class base symbol (e.g. kObject). |
| #define kBeginEnum | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginEnum_(PREFIX, SYMBOL, BASE) |
Starts the definition of an enumeration value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kStatus). |
| BASE | Value base symbol (typically kValue). |
| #define kBeginFullClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginFullClass_(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kFile). |
| BASE | Class base symbol (e.g. kObject). |
| #define kBeginInterface | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginInterface_(PREFIX, SYMBOL, BASE) |
Starts the definition of an interface type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Interface symbol(e.g. kCollection). |
| BASE | Interface base symbol (typically kNull). |
| #define kBeginStaticClass | ( | PREFIX, | |
| SYMBOL | |||
| ) | kBeginStaticClass_(PREFIX, SYMBOL) |
Starts the definition of a class type that has only static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kNetwork). |
| #define kBeginValue | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginValue_(PREFIX, SYMBOL, BASE) |
Starts the definition of a structure value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. k32s). |
| BASE | Value base symbol (typically kValue). |
| #define kBeginVirtualClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kBeginVirtualClass_(PREFIX, SYMBOL, BASE) |
Starts the definition of a class type that requires an expanded vtable but does not have static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kAlloc). |
| BASE | Class base symbol (e.g. kObject). |
| #define kCast | ( | TYPE, | |
| ITEM | |||
| ) | kCast_(TYPE, ITEM) |
Casts the ITEM argument to the specified TYPE.
Equivalent (TYPE)(ITEM).
This macro is guaranteed to evaluate its arguments only once.
| TYPE | Type to which the item is cast. |
| ITEM | Value to be cast. |
| #define kCatch | ( | STATUS_POINTER | ) | kCatch_(STATUS_POINTER) |
Closes a kTry block and opens a kCatch error-handling block.
This macro is guaranteed to evaluate its arguments only once.
| STATUS_POINTER | Receives the exception code. |
| #define kCatchEx | ( | STATUS_POINTER | ) | kCatchEx_(STATUS_POINTER) |
Closes a kTry block and opens a kCatchEx error-handling block.
This macro is guaranteed to evaluate its arguments only once.
| STATUS_POINTER | Receives the exception code. |
| #define kCheck | ( | EXPRESSION | ) | kCheck_(EXPRESSION) |
Executes a return statement if the given expression is not kOK.
If the expression result is not kOK, the current function will return the expression result.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kStatus value. |
| #define kCheckArgs | ( | EXPRESSION | ) | kCheckArgs_(EXPRESSION) |
Executes a return statement if the given expression is not kTRUE.
If the expression result is kFALSE, the current function will return kERROR_PARAMETER.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kBool value. |
| #define kCheckState | ( | EXPRESSION | ) | kCheckState_(EXPRESSION) |
Executes a return statement if the given expression is not kTRUE.
If the expression result is kFALSE, the current function will return kERROR_STATE.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kBool value. |
| #define kClamp_ | ( | V, | |
| VMIN, | |||
| VMAX | |||
| ) | kxClamp_((V), (VMIN), (VMAX)) |
Returns a value limited to the specified range.
| V | Input value. |
| VMIN | Minimum output value. |
| VMAX | Maximum output value. |
| #define kCountOf | ( | CARRAY | ) | kCountOf_(CARRAY) |
Returns the number of elements in a C array.
Equivalent to sizeof(CARRAY)/sizeof(CARRAY[0]).
| CARRAY | C array variable name. |
| #define kDeclareArrayValue | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareArrayValue_(PREFIX, SYMBOL, BASE) |
Declares type information for an array-based value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kText32). |
| BASE | Value base symbol (typically kValue). |
| #define kDeclareAssembly | ( | PREFIX, | |
| SYMBOL | |||
| ) | kDeclareAssembly_(PREFIX, SYMBOL) |
Declares a type assembly.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Assembly symbol name (e.g. kApi). |
| #define kDeclareBitEnum | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareBitEnum_(PREFIX, SYMBOL, BASE) |
Declares type information for a bit-flag enumeration value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kFileMode). |
| BASE | Value base symbol (typically kValue). |
| #define kDeclareClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareClass_(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that does not require an expanded vtable and does not have static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kArrayList). |
| BASE | Class base symbol (e.g. kObject). |
| #define kDeclareEnum | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareEnum_(PREFIX, SYMBOL, BASE) |
Declares type information for an enumeration value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. kStatus). |
| BASE | Value base symbol (typically kValue). |
| #define kDeclareFullClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareFullClass_(PREFIX, SYMBOL, BASE) |
Declares type information for a class type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kFile). |
| BASE | Class base symbol (e.g. kObject). |
| #define kDeclareInterface | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareInterface_(PREFIX, SYMBOL, BASE) |
Declares type information for an interface type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Interface symbol(e.g. kCollection). |
| BASE | Interface base symbol (typically kNull). |
| #define kDeclareStaticClass | ( | PREFIX, | |
| SYMBOL | |||
| ) | kDeclareStaticClass_(PREFIX, SYMBOL) |
Declares type information for a class type that has only static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kNetwork). |
| #define kDeclareValue | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareValue_(PREFIX, SYMBOL, BASE) |
Declares type information for a structure value type.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Value symbol(e.g. k32s). |
| BASE | Value base symbol (typically kValue). |
| #define kDeclareVirtualClass | ( | PREFIX, | |
| SYMBOL, | |||
| BASE | |||
| ) | kDeclareVirtualClass_(PREFIX, SYMBOL, BASE) |
Declares type information for a class type that requires an expanded vtable but does not have static data.
| PREFIX | Function/data declaration prefix (e.g. k). |
| SYMBOL | Class symbol(e.g. kAlloc). |
| BASE | Class base symbol (e.g. kObject). |
| #define kEndArrayValue | ( | ) | kEndArrayValue_() |
Ends the definition of an array-based value type.
| #define kEndAssembly | ( | ) | kEndAssembly_() |
Ends the definition of a type assembly.
| #define kEndBitEnum | ( | ) | kEndBitEnum_() |
Ends the definition of a bit-flag enumeration value type.
| #define kEndCatch | ( | STATUS | ) | kEndCatch_(STATUS) |
Closes a kCatch block.
If the STATUS argument is not kOK, the current function returns STATUS.
This macro is guaranteed to evaluate its arguments only once.
| STATUS | Result of the kCatch block. |
| #define kEndCatchEx | ( | STATUS | ) | kEndCatchEx_(STATUS) |
Closes a kCatchEx block.
The exception state is set to the value of the STATUS argument. If the exception state is not kOK, the kFinallyEx block will return the exception code to the caller when kFinallyEndEx is reached.
This macro is guaranteed to evaluate its arguments only once.
| STATUS | Result of the kCatchEx block. |
| #define kEndClass | ( | ) | kEndClass_() |
Ends the definition of a class type that does not require an expanded vtable and does not have static data.
| #define kEndEnum | ( | ) | kEndEnum_() |
Ends the definition of an enumeration value type.
| #define kEndFinally | ( | ) | kEndFinally_() |
Closes a kFinally block.
If the kTry block produced an exception, the current function returns the exception code. Otherwise, execution continues after the kFinally block.
| #define kEndFinallyEx | ( | ) | kEndFinallyEx_() |
Closes a kFinallyEx block.
If the exception state passed by kEndCatchEx is not kOK, the current function returns the exception code. Otherwise, execution continues after the kFinallyEx block.
| #define kEndFullClass | ( | ) | kEndFullClass_() |
Ends the definition of a class type.
| #define kEndInterface | ( | ) | kEndInterface_() |
Ends the definition of an interface type.
| #define kEndStaticClass | ( | ) | kEndStaticClass_() |
Ends the definition of a class type that has only static data.
| #define kEndValue | ( | ) | kEndValue_() |
Ends the definition of a structure value type.
| #define kEndVirtualClass | ( | ) | kEndVirtualClass_() |
Ends the definition of a class type that requires an expanded vtable but does not have static data.
| #define kFinally kFinally_ |
Closes a kTry block and opens a kFinally block.
| #define kFinallyEx kFinallyEx_ |
Opens a kFinallyEx block.
| #define kIsError | ( | EXPRESSION | ) | kIsError_(EXPRESSION) |
Returns kTRUE if the given status value is not kOK.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kStatus value. |
| #define kIsNull | ( | POINTER | ) | kIsNull_(POINTER) |
Tests for equality with null pointer.
| POINTER | Pointer to be compared with null. |
| #define kItemAt_ | ( | BASE, | |
| INDEX, | |||
| SIZE | |||
| ) | kAt_((BASE), (INDEX)*(SIZE)) |
Gets a pointer to the Nth element of an array.
| BASE | Array pointer. |
| INDEX | Element index. |
| SIZE | Element size. |
| #define kItemCopy_ | ( | DEST, | |
| SRC, | |||
| SIZE | |||
| ) | kxItemCopy_(DEST, SRC, SIZE) |
Performs a small copy with minimal overhead.
| DEST | Destination address. |
| SRC | Source address. |
| SIZE | Transfer size (bytes). |
| #define kItemSet_ | ( | DEST, | |
| FILL, | |||
| SIZE | |||
| ) | kxItemSet_(DEST, FILL, SIZE) |
Performs a small fill with minimal overhead.
| DEST | Destination address. |
| FILL | Value to fill (byte). |
| SIZE | Fill size (bytes). |
| #define kItemZero_ | ( | DEST, | |
| SIZE | |||
| ) | kItemSet_(DEST, 0, SIZE) |
Zero-initializes a small amount of memory with minimal overhead.
| DEST | Destination address. |
| SIZE | Transfer size (bytes). |
| #define kMax_ | ( | A, | |
| B | |||
| ) | kxMax_(A, B) |
Returns the maximum of two numbers.
| A | First value. |
| B | Second value. |
| #define kMin_ | ( | A, | |
| B | |||
| ) | kxMin_(A, B) |
Returns the minimum of two numbers.
| A | First value. |
| B | Second value. |
| #define kPoint3d_Init_ | ( | POINT, | |
| X, | |||
| Y, | |||
| Z | |||
| ) | kxPoint3d_Init_(POINT, X, Y, Z) |
Initializes a 3d point structure.
| POINT | Pointer to a 3d point structure. |
| X | x field value. |
| Y | y field value. |
| Z | z field value. |
| #define kPoint_Init_ | ( | POINT, | |
| X, | |||
| Y | |||
| ) | kxPoint_Init_(POINT, X, Y) |
Initializes a point structure.
| POINT | Pointer to a point structure. |
| X | x field value. |
| Y | y field value. |
| #define kRect_Init_ | ( | RECT, | |
| X, | |||
| Y, | |||
| W, | |||
| H | |||
| ) | kxRect_Init_(RECT, X, Y, W, H) |
Initializes a rectangle structure.
| RECT | Pointer to a rectangle structure. |
| X | x field value. |
| Y | y field value. |
| W | width field value. |
| H | height field value. |
| #define kRgb_Init_ | ( | RGB, | |
| R, | |||
| G, | |||
| B | |||
| ) | kxRgb_Init_(RGB, R, G, B) |
| #define kRotatedRect_Init_ | ( | RECT, | |
| XC, | |||
| YC, | |||
| W, | |||
| H, | |||
| A | |||
| ) | kxRotatedRect_Init_(RECT, XC, YC, W, H, A) |
Initializes a rotated rectangle structure.
| RECT | Pointer to a rotated rectangle structure. |
| XC | xc field value. |
| YC | yc field value. |
| W | width field value. |
| H | height field value. |
| A | angle field value. |
| #define kStaticInitialized | ( | SYMBOL | ) | kStaticInitialized_(SYMBOL) |
Indicates whether static initialization has completed for the specified type symbol.
| SYMBOL | Class symbol, such as kArrayList. |
| #define kStaticOf | ( | SYMBOL | ) | kStaticOf_(SYMBOL) |
Returns static data associated with the specified class symbol.
This macro is used within class implementations to access static state.
| SYMBOL | Class symbol, such as kArrayList. |
| #define kSuccess | ( | EXPRESSION | ) | kSuccess_(EXPRESSION) |
Returns kTRUE if the given expression value is kOK.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kStatus value. |
| #define kTest | ( | EXPRESSION | ) | kTest_(EXPRESSION) |
Used within a kTry block to conditionally jump to the first error handling block (e.g.
kCatch).
If the EXPRESSION argument does not evaluate to kOK, the result of the expression is passed to an error-handling block. Otherwise, execution continues at the next statement.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kStatus value. |
| #define kTestArgs | ( | EXPRESSION | ) | kTestArgs_(EXPRESSION) |
Within a kTry block, throws kERROR_PARAMETER if the expression result is kFALSE.
If the EXPRESSION argument does not evaluate to kTRUE, kERROR_PARAMETER is passed to an error-handling block. Otherwise, execution continues at the next statement.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kBool value. |
| #define kTestState | ( | EXPRESSION | ) | kTestState_(EXPRESSION) |
Within a kTry block, throws kERROR_STATE if the expression result is kFALSE.
If the EXPRESSION argument does not evaluate to kTRUE, kERROR_STATE is passed to an error-handling block. Otherwise, execution continues at the next statement.
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kBool value. |
| #define kThrow | ( | EXPRESSION | ) | kThrow_(EXPRESSION) |
Used within a kTry block to jump to the first error handling block (e.g.
kCatch).
This macro is guaranteed to evaluate its arguments only once.
| EXPRESSION | Expression that evaluates to a kStatus value. |
| #define kTrace | ( | TAG | ) | kTrace_(TAG) |
Generates a trace event using the given tag (string literals only).
Type is equivalence is determined using kObject_Is.
kTrace statements are omitted if K_NO_TRACE is defined.
| TAG | String literal passed to the trace handler. |
| #define kTry kTry_ |
Opens a kTry error-checking block.
| #define kTypeOf | ( | SYMBOL | ) | 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.
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>.
| SYMBOL | Type symbol, such as kArrayList or k32s. |
| #define kZero_ | ( | VALUE | ) | kxZero_(VALUE) |
Sets all bits of a structure to zero.
| VALUE | Structure instance. |
Callback signature for a generic event handler.
| receiver | Receiver context pointer. |
| sender | Sender context pointer. |
| args | Pointer to callback argument. |
Callback signature to determine equality of two items.
| item1 | Pointer to first item. |
| item2 | Pointer to second item. |