Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kArray2.h
Go to the documentation of this file.
1
10 #ifndef K_API_ARRAY_2_H
11 #define K_API_ARRAY_2_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17
35 //typedef kObject kArray2; --forward-declared in kApiDef.x.h
36
37
48 kFx(kStatus) kArray2_Construct(kArray2* array, kType itemType, kSize length0, kSize length1, kAlloc allocator);
49
60 kFx(kStatus) kArray2_Allocate(kArray2 array, kType itemType, kSize length0, kSize length1);
61
75 kFx(kStatus) kArray2_Attach(kArray2 array, void* items, kType itemType, kSize length0, kSize length1);
76
88 kFx(kStatus) kArray2_Assign(kArray2 array, kArray2 source);
89
97 kFx(kStatus) kArray2_Zero(kArray2 array);
98
109 kFx(kStatus) kArray2_SetItem(kArray2 array, kSize index0, kSize index1, const void* item);
110
121 kFx(kStatus) kArray2_Item(kArray2 array, kSize index0, kSize index1, void* item);
122
130 kFx(void*) kArray2_Data(kArray2 array);
131
139 kFx(kSize) kArray2_DataSize(kArray2 array);
140
150 kFx(void*) kArray2_At(kArray2 array, kSize index0, kSize index1);
151
159 kFx(kType) kArray2_ItemType(kArray2 array);
160
168 kFx(kSize) kArray2_ItemSize(kArray2 array);
169
178 kFx(kSize) kArray2_Length(kArray2 array, kSize dimension);
179
187 kFx(kSize) kArray2_Count(kArray2 array);
188
191 #define kArray2_ItemType_(ARRAY) kxArray2_ItemType_(ARRAY)
192 #define kArray2_ItemSize_(ARRAY) kxArray2_ItemSize_(ARRAY)
193 #define kArray2_Length_(ARRAY, DIM) kxArray2_Length_(ARRAY, DIM)
194 #define kArray2_Count_(ARRAY) kxArray2_Count_(ARRAY)
195 #define kArray2_Data_(ARRAY) kxArray2_Data_(ARRAY)
196 #define kArray2_DataSize_(ARRAY) kxArray2_DataSize_(ARRAY)
197 #define kArray2_At_(ARRAY, I0, I1) kxArray2_At_(ARRAY, I0, I1)
198
199
200 #define kArray2_As_(ARRAY, I0, I1, TYPE) kxArray2_As_(ARRAY, I0, I1, TYPE)
201
205 kEndHeader()
206
207 #include <kApi/Data/kArray2.x.h>
208
209 #endif
kArray2::kArray2_Allocate
kStatus kArray2_Allocate(kArray2 array, kType itemType, kSize length0, kSize length1)
Reallocates the internal array item buffer.
kArray2::kArray2_DataSize
kSize kArray2_DataSize(kArray2 array)
Reports the size, in bytes, of the array item buffer.
kArray2::kArray2_Construct
kStatus kArray2_Construct(kArray2 *array, kType itemType, kSize length0, kSize length1, kAlloc allocator)
Constructs a kArray2 object.
kArray2::kArray2_Count
kSize kArray2_Count(kArray2 array)
Returns the array item count, in elements.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kArray2
Represents a 2D array.
kArray2::kArray2_At
void * kArray2_At(kArray2 array, kSize index0, kSize index1)
Returns a pointer to the specified item in the array.
kArray2::kArray2_SetItem
kStatus kArray2_SetItem(kArray2 array, kSize index0, kSize index1, const void *item)
Sets the value of an item.
kArray2::kArray2_Length
kSize kArray2_Length(kArray2 array, kSize dimension)
Returns the length of the specified array dimension, in elements.
kArray2::kArray2_Zero
kStatus kArray2_Zero(kArray2 array)
Sets all array element bits to zero.
kArray2::kArray2_ItemSize
kSize kArray2_ItemSize(kArray2 array)
Returns the array item size.
kApiDef.h
Core Zen type declarations.
kType
Represents metadata about a type (class, interface, or value).
kArray2::kArray2_Data
void * kArray2_Data(kArray2 array)
Returns a pointer to the array item buffer.
kArray2::kArray2_Assign
kStatus kArray2_Assign(kArray2 array, kArray2 source)
Performs a shallow copy of the source array.
kStatus
Represents an error code.
kArray2::kArray2_Item
kStatus kArray2_Item(kArray2 array, kSize index0, kSize index1, void *item)
Gets the value of an item.
kArray2::kArray2_Attach
kStatus kArray2_Attach(kArray2 array, void *items, kType itemType, kSize length0, kSize length1)
Attaches the array to an external item buffer.
kArray2::kArray2_ItemType
kType kArray2_ItemType(kArray2 array)
Returns the array item type.