Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kArray1.h
Go to the documentation of this file.
1
10 #ifndef K_API_ARRAY_1_H
11 #define K_API_ARRAY_1_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17
35 //typedef kObject kArray1; --forward-declared in kApiDef.x.h
36
37
47 kFx(kStatus) kArray1_Construct(kArray1* array, kType itemType, kSize length, kAlloc allocator);
48
58 kFx(kStatus) kArray1_Allocate(kArray1 array, kType itemType, kSize length);
59
72 kFx(kStatus) kArray1_Attach(kArray1 array, void* items, kType itemType, kSize length);
73
85 kFx(kStatus) kArray1_Assign(kArray1 array, kArray1 source);
86
94 kFx(kStatus) kArray1_Zero(kArray1 array);
95
105 kFx(kStatus) kArray1_SetItem(kArray1 array, kSize index, const void* item);
106
116 kFx(kStatus) kArray1_Item(kArray1 array, kSize index, void* item);
117
125 kFx(void*) kArray1_Data(kArray1 array);
126
134 kFx(kSize) kArray1_DataSize(kArray1 array);
135
144 kFx(void*) kArray1_At(kArray1 array, kSize index);
145
153 kFx(kType) kArray1_ItemType(kArray1 array);
154
162 kFx(kSize) kArray1_ItemSize(kArray1 array);
163
171 kFx(kSize) kArray1_Length(kArray1 array);
172
183 kFx(kSize) kArray1_Count(kArray1 array);
184
187 #define kArray1_ItemType_(ARRAY) kxArray1_ItemType_(ARRAY)
188 #define kArray1_ItemSize_(ARRAY) kxArray1_ItemSize_(ARRAY)
189 #define kArray1_Length_(ARRAY) kxArray1_Length_(ARRAY)
190 #define kArray1_Count_(ARRAY) kxArray1_Count_(ARRAY)
191 #define kArray1_Data_(ARRAY) kxArray1_Data_(ARRAY)
192 #define kArray1_DataSize_(ARRAY) kxArray1_DataSize_(ARRAY)
193 #define kArray1_At_(ARRAY, INDEX) kxArray1_At_(ARRAY, INDEX)
194
195
196 #define kArray1_As_(ARRAY, INDEX, TYPE) kxArray1_As_(ARRAY, INDEX, TYPE)
197
201 kEndHeader()
202
203 #include <kApi/Data/kArray1.x.h>
204
205 #endif
kArray1
Represents a 1D array.
kArray1::kArray1_Zero
kStatus kArray1_Zero(kArray1 array)
Sets all array element bits to zero.
kArray1::kArray1_ItemType
kType kArray1_ItemType(kArray1 array)
Returns the array item type.
kSize
Represents an unsigned integer that can store a pointer address.
kArray1::kArray1_Allocate
kStatus kArray1_Allocate(kArray1 array, kType itemType, kSize length)
Reallocates the internal array item buffer.
kAlloc
Abstract base class for memory allocator types.
kArray1::kArray1_Data
void * kArray1_Data(kArray1 array)
Returns a pointer to the array item buffer.
kArray1::kArray1_ItemSize
kSize kArray1_ItemSize(kArray1 array)
Returns the array item size.
kArray1::kArray1_At
void * kArray1_At(kArray1 array, kSize index)
Returns a pointer to the specified item in the array.
kArray1::kArray1_Construct
kStatus kArray1_Construct(kArray1 *array, kType itemType, kSize length, kAlloc allocator)
Constructs a kArray1 object.
kApiDef.h
Core Zen type declarations.
kArray1::kArray1_Item
kStatus kArray1_Item(kArray1 array, kSize index, void *item)
Gets the value of an item.
kType
Represents metadata about a type (class, interface, or value).
kArray1::kArray1_DataSize
kSize kArray1_DataSize(kArray1 array)
Reports the size, in bytes, of the array item buffer.
kArray1::kArray1_Count
kSize kArray1_Count(kArray1 array)
Returns the array item count, in elements.
kStatus
Represents an error code.
kArray1::kArray1_SetItem
kStatus kArray1_SetItem(kArray1 array, kSize index, const void *item)
Sets the value of an item.
kArray1::kArray1_Assign
kStatus kArray1_Assign(kArray1 array, kArray1 source)
Performs a shallow copy of the source array.
kArray1::kArray1_Attach
kStatus kArray1_Attach(kArray1 array, void *items, kType itemType, kSize length)
Attaches the array to an external item buffer.
kArray1::kArray1_Length
kSize kArray1_Length(kArray1 array)
Returns the array length, in elements.