Lines Matching defs:array
113 /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
116 /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
180 /* Returns the number of items in an array (or object). */
181 CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array);
182 /* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */
183 CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index);
231 /* Create an object/array that only references it's elements so
237 * The parameter count cannot be greater than the number of elements in the number array, otherwise array access will be out of bounds.*/
243 /* Append item to the specified array/object. */
244 CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToArray(cJSON *array, cJSON *item);
250 /* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */
251 CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
256 CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which);
257 CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which);
263 /* Update array items. */
264 CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */
266 CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
317 /* Macro for iterating over an array or object */
318 #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)