Lines Matching +full:set +full:- +full:top
1 /* Copyright (c) 2013-2015, Vsevolod Stakhov
47 * - @ref structures
48 * - @ref utils
49 * - @ref parser
50 * - @ref emitter
66 * UCL_ALLOC(size) - allocate memory for UCL
67 * UCL_FREE(size, ptr) - free memory of specified size at ptr
122 UCL_OBJECT = 0, /**< UCL object - key/value pairs */
148 * zero-terminated keys and string values then you should not use zero-copy mode, as in this case
154 UCL_PARSER_ZEROCOPY = (1 << 1), /**< Parse input in zero-copy mode if possible */
159 UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */
212 UCL_PARSE_CSEXP, /**< Canonical S-expressions */
259 * Copy and return a key of an object, returned key is zero-terminated
266 * Copy and return a string value of an object, returned key is zero-terminated
381 * Insert a object 'elt' to the hash 'top' and associate it with key 'key'
382 * @param top destination object (must be of type UCL_OBJECT)
389 UCL_EXTERN bool ucl_object_insert_key (ucl_object_t *top, ucl_object_t *elt,
393 …* Replace a object 'elt' to the hash 'top' and associate it with key 'key', old object will be unr…
395 * @param top destination object (must be of type UCL_OBJECT)
402 UCL_EXTERN bool ucl_object_replace_key (ucl_object_t *top, ucl_object_t *elt,
407 * @param top destination object (must be of type UCL_OBJECT)
412 UCL_EXTERN bool ucl_object_merge (ucl_object_t *top, ucl_object_t *elt, bool copy);
416 * @param top object
420 UCL_EXTERN bool ucl_object_delete_keyl (ucl_object_t *top,
425 * @param top object
428 UCL_EXTERN bool ucl_object_delete_key (ucl_object_t *top,
433 * Removes `key` from `top` object, returning the object that was removed. This
436 * @param top object
441 UCL_EXTERN ucl_object_t* ucl_object_pop_keyl (ucl_object_t *top, const char *key,
445 * Removes `key` from `top` object returning the object that was removed. This
448 * @param top object
452 UCL_EXTERN ucl_object_t* ucl_object_pop_key (ucl_object_t *top, const char *key)
456 * Insert a object 'elt' to the hash 'top' and associate it with key 'key', if
458 * @param top destination object (must be of type UCL_OBJECT)
465 UCL_EXTERN bool ucl_object_insert_key_merged (ucl_object_t *top, ucl_object_t *elt,
472 * @return 0 on success, -1 on failure (i.e. ENOMEM)
478 * @param top destination object (must NOT be NULL)
482 UCL_EXTERN bool ucl_array_append (ucl_object_t *top,
487 * @param top destination object (must NOT be NULL)
491 UCL_EXTERN bool ucl_array_prepend (ucl_object_t *top,
496 * @param top destination array (must be of type UCL_ARRAY)
501 UCL_EXTERN bool ucl_array_merge (ucl_object_t *top, ucl_object_t *elt,
505 * Removes an element `elt` from the array `top`, returning the object that was
508 * @param top array ucl object
510 * @return removed element or NULL if `top` is NULL or not an array
512 UCL_EXTERN ucl_object_t* ucl_array_delete (ucl_object_t *top,
516 * Returns the first element of the array `top`
517 * @param top array ucl object
518 * @return element or NULL if `top` is NULL or not an array
520 UCL_EXTERN const ucl_object_t* ucl_array_head (const ucl_object_t *top);
523 * Returns the last element of the array `top`
524 * @param top array ucl object
525 * @return element or NULL if `top` is NULL or not an array
527 UCL_EXTERN const ucl_object_t* ucl_array_tail (const ucl_object_t *top);
530 * Removes the last element from the array `top`, returning the object that was
533 * @param top array ucl object
534 * @return removed element or NULL if `top` is NULL or not an array
536 UCL_EXTERN ucl_object_t* ucl_array_pop_last (ucl_object_t *top);
539 * Removes the first element from the array `top`, returning the object that was
542 * @param top array ucl object
543 * @return removed element or NULL if `top` is NULL or not an array
545 UCL_EXTERN ucl_object_t* ucl_array_pop_first (ucl_object_t *top);
548 * Return size of the array `top`
549 * @param top object to get size from (must be of type UCL_ARRAY)
552 UCL_EXTERN unsigned int ucl_array_size (const ucl_object_t *top);
555 * Return object identified by index of the array `top`
556 * @param top object to get a key from (must be of type UCL_ARRAY)
560 UCL_EXTERN const ucl_object_t* ucl_array_find_index (const ucl_object_t *top,
564 * Return the index of `elt` in the array `top`
565 * @param top object to get a key from (must be of type UCL_ARRAY)
567 * @return index of `elt` in the array `top or (unsigned int)-1 if `elt` is not found
569 UCL_EXTERN unsigned int ucl_array_index_of (ucl_object_t *top,
576 * @param top destination object (must be of type UCL_ARRAY)
582 ucl_array_replace_index (ucl_object_t *top, ucl_object_t *elt,
663 * allows zero-copy (if #UCL_PARSER_ZEROCOPY has been used during parsing)
824 * Set explicit priority of an object.
839 * @param iter opaque iterator, must be set to NULL on the first call:
962 * @return true if parser's default priority was set
970 * @return true default priority (0 .. 16), -1 for failure
1022 * Set handler for unknown variables
1053 * Insert new chunk to a parser (must have previously processed data with an existing top object)
1081 * @param len the length of the string, if `len` is 0 then `data` must be zero-terminated string
1091 * @param len the length of the string, if `len` is 0 then `data` must be zero-terminated string
1103 * @param err if *err is NULL it is set to parser error
1113 * @param err if *err is NULL it is set to parser error
1139 * @param err if *err is NULL it is set to parser error
1149 * @param err if *err is NULL it is set to parser error
1161 * @param err if *err is NULL it is set to parser error
1183 * Get a top object for a parser (refcount is increased)
1185 * @param err if *err is NULL it is set to parser error
1186 * @return top parser object or NULL
1194 * @param depth depth of stack to retrieve (top is 0)
1294 * @param err if *err is NULL it is set to parser error
1301 * Set FILENAME and CURDIR variables in parser
1303 * @param filename filename to set or NULL to set FILENAME to "undef" and CURDIR to getcwd()
1305 * @return true if variables has been set
1433 /** A set of output functions */
1435 /** A set of output operations */
1439 /** Top level object */
1440 const ucl_object_t *top; member
1471 * @param emitter a set of emitter functions
1482 * @param obj top UCL object
1484 * @param emitter a set of emitter functions