14 #include <kApi/Data/kBox.x.h>
93 #define kBox_SetItemT(kBox_box, TPtr_item) \
94 xkBox_SetItemT(kBox_box, TPtr_item, sizeof(*(TPtr_item)))
117 #define kBox_SetAsT(kBox_box, T_value, T) \
118 (kPointer_WriteAs(xkBox_AsT(kBox_box, sizeof(T)), T_value, T), (void)0)
130 #define kBox_AsT(kBox_box, T) \
131 kPointer_ReadAs(xkBox_AsT(kBox_box, sizeof(T)), T)
144 #define kBox_ItemT(kBox_box, TPtr_item) \
145 xkBox_ItemT(kBox_box, TPtr_item, sizeof(*(TPtr_item)))
172 #define kBox_DataT(kBox_box, T) \
173 kCast(T*, xkBox_DataT(kBox_box, sizeof(T)))
186 return obj->itemType;
200 return obj->itemSize;
kStatus kBox_Construct(kBox *box, kType itemType, kAlloc allocator)
Constructs a kBox object.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kStatus kBox_Assign(kBox box, kBox source)
Copies the value contained within the source box into this box.
#define kObj(TypeName_T, T_object)
Declares a local "obj" (this-pointer) variable and initializes it from a type-checked object handle...
Definition: kApiDef.h:3383
kType kBox_ItemType(kBox box)
Returns the box item type.
Definition: kBox.h:182
Core Zen type declarations.
kStatus kBox_Zero(kBox box)
Sets all box element bits to zero.
Represents an instance of a value type as an object.
void * kBox_Data(kBox box)
Returns a pointer to the box item buffer.
Definition: kBox.h:154
Represents metadata about a type (class, interface, or value).
Represents an error code.
kStatus kBox_SetItem(kBox box, const void *item)
Sets the box value.
kSize kBox_ItemSize(kBox box)
Returns the box item size.
Definition: kBox.h:196
kStatus kBox_Allocate(kBox box, kType itemType)
Reallocates the internal box item buffer.
kStatus kBox_Item(kBox box, void *item)
Gets the box value.