Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kBox.h
Go to the documentation of this file.
1 
10 #ifndef K_API_BOX_H
11 #define K_API_BOX_H
12 
13 #include <kApi/kApiDef.h>
14 
15 kBeginHeader()
16 
17 
31 //typedef kObject kBox; --forward-declared in kApiDef.x.h
32 
33 
42 kFx(kStatus) kBox_Construct(kBox* box, kType itemType, kAlloc allocator);
43 
52 kFx(kStatus) kBox_Allocate(kBox box, kType itemType);
53 
62 kFx(kStatus) kBox_Assign(kBox box, kBox source);
63 
71 kFx(kStatus) kBox_Zero(kBox box);
72 
81 kFx(kStatus) kBox_SetItem(kBox box, const void* item);
82 
91 kFx(kStatus) kBox_Item(kBox box, void* item);
92 
100 kFx(void*) kBox_Data(kBox box);
101 
109 kFx(kType) kBox_ItemType(kBox box);
110 
118 kFx(kSize) kBox_ItemSize(kBox box);
119 
122 #define kBox_ItemType_(BOX) kxBox_ItemType_(BOX)
123 #define kBox_ItemSize_(BOX) kxBox_ItemSize_(BOX)
124 #define kBox_Data_(BOX) kxBox_Data_(BOX)
125 
126 
127 #define kBox_As_(BOX, TYPE) kxBox_As_(BOX, TYPE)
128 
131 kEndHeader()
132 
133 #include <kApi/Data/kBox.x.h>
134 
135 #endif
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.
kStatus kBox_Assign(kBox box, kBox source)
Copies the value contained within the source box into this box.
kType kBox_ItemType(kBox box)
Returns the box item type.
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.
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.
kStatus kBox_Allocate(kBox box, kType itemType)
Reallocates the internal box item buffer.
kStatus kBox_Item(kBox box, void *item)
Gets the box value.