Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Related
kValue Class Reference
kApi

## Description

Root of all Zen value types.

Value types represent structures, primitive values and enumerations. The kValue base type defines methods that can be called on any value instance. kValue does not add any public or private fields to the types that extend kValue.

The kValue_Equals and kValue_HashCode methods are used to support value comparisons and are implemented by most value types.

kBool EqualsExample(const kRect32s* a, const kRect32s* b)
{
return kValue_Equals(kTypeOf(kRect32s), a, b);
}

Unlike reference types, value types do not carry type information. Accordingly, type information must be passed as the first argument of any kValue method.

Inherited by k16s, k16u, k32f, k32s, k32u, k64f, k64s, k64u, k8s, k8u, kArgb, kAtomic32s, kAtomicPointer, kBool, kByte, kCallback, kCfa, kChar, kCipherMode, kCipherPadding, kComparison, kCompressionPreset, kCompressionType, kDateTime, kDateTimeFormat, kDebugAllocation, kEndianness, kFileMode, kHttpStatus, kIpAddress, kIpEndPoint, kIpVersion, kLockOption, kMsgQueueItemOption, kMsgQueuePurgeOption, kParallelArgs, kPixelFormat, kPoint16s, kPoint32f, kPoint32s, kPoint3d16s, kPoint3d32f, kPoint3d32s, kPoint3d64f, kPoint4d16s, kPoint64f, kPointer, kRect16s, kRect32f, kRect32s, kRect3d64f, kRect64f, kRgb, kRotatedRect32f, kRotatedRect32s, kSeekOrigin, kSize, kSocketType, kSSize, kStatus, kText128, kText16, kText256, kText32, kText64, kTimeSpanFormat, kTypeFlags, kVersion, and kWebSocketDataType.

## Public Member Functions
kBool | kValue_Equals (kType type, const void *value, const void *other)
| Determines whether a value is equal to another value. More...
kSize | kValue_HashCode (kType type, const void *value)
| Gets a hash code representing the state of this value. More...
void | kValue_Import (kType type, void *value, const void *source)
| Imports the content of another value into this value. More...

## Protected Member Functions
kBool | kValue_VEquals (kType type, const void *value, const void *other)
| Protected virtual method that compares two values for equality. More...
kSize | kValue_VHashCode (kType type, const void *value)
| Protected virtual method that calculates a hash code representing the value instance. More...
void | kValue_VImport (kType type, void *value, const void *source)
| Protected virtual method that imports data from an external source into an array-value type. More...

## Related
#define | kValue_EqualsT(kType_type, TPtr_value, TPtr_other)
| Determines whether a value is equal to another value. More...
#define | kValue_HashCodeT(kType_type, TPtr_value)
| Gets a hash code representing the state of this value. More...

The documentation for this class was generated from the following file:

- kValue.h