Data Structures | |
struct | apr_array_header_t |
struct | apr_table_entry_t |
Defines | |
#define | APR_OVERLAP_TABLES_SET (0) |
#define | APR_OVERLAP_TABLES_MERGE (1) |
Typedefs | |
typedef apr_table_t | apr_table_t |
typedef apr_array_header_t | apr_array_header_t |
typedef apr_table_entry_t | apr_table_entry_t |
typedef const char * | key |
typedef const char const char * | value |
Functions | |
const apr_array_header_t * | apr_table_elts (const apr_table_t *t) |
int | apr_is_empty_table (const apr_table_t *t) |
int | apr_is_empty_array (const apr_array_header_t *a) |
apr_array_header_t * | apr_array_make (apr_pool_t *p, int nelts, int elt_size) |
void * | apr_array_push (apr_array_header_t *arr) |
void * | apr_array_pop (apr_array_header_t *arr) |
void | apr_array_cat (apr_array_header_t *dst, const apr_array_header_t *src) |
apr_array_header_t * | apr_array_copy (apr_pool_t *p, const apr_array_header_t *arr) |
apr_array_header_t * | apr_array_copy_hdr (apr_pool_t *p, const apr_array_header_t *arr) |
apr_array_header_t * | apr_array_append (apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second) |
char * | apr_array_pstrcat (apr_pool_t *p, const apr_array_header_t *arr, const char sep) |
apr_table_t * | apr_table_make (apr_pool_t *p, int nelts) |
apr_table_t * | apr_table_copy (apr_pool_t *p, const apr_table_t *t) |
void | apr_table_clear (apr_table_t *t) |
const char * | apr_table_get (const apr_table_t *t, const char *key) |
void | apr_table_set (apr_table_t *t, const char *key, const char *val) |
void | apr_table_setn (apr_table_t *t, const char *key, const char *val) |
void | apr_table_unset (apr_table_t *t, const char *key) |
void | apr_table_merge (apr_table_t *t, const char *key, const char *val) |
void | apr_table_mergen (apr_table_t *t, const char *key, const char *val) |
void | apr_table_add (apr_table_t *t, const char *key, const char *val) |
void | apr_table_addn (apr_table_t *t, const char *key, const char *val) |
apr_table_t * | apr_table_overlay (apr_pool_t *p, const apr_table_t *overlay, const apr_table_t *base) |
typedef | int (apr_table_do_callback_fn_t)(void *rec |
int | apr_table_do (apr_table_do_callback_fn_t *comp, void *rec, const apr_table_t *t,...) |
int | apr_table_vdo (apr_table_do_callback_fn_t *comp, void *rec, const apr_table_t *t, va_list vp) |
void | apr_table_overlap (apr_table_t *a, const apr_table_t *b, unsigned flags) |
void | apr_table_compress (apr_table_t *t, unsigned flags) |
|
flag for overlap to use apr_table_mergen |
|
flag for overlap to use apr_table_setn |
|
|
|
The (opaque) structure for string-content tables. |
|
the table abstract data type |
|
Append one array to the end of another, creating a new array in the process.
|
|
Concatenate two arrays together
|
|
Copy the entire array
|
|
Copy the headers of the array, and arrange for the elements to be copied if and only if the code subsequently does a push or arraycat.
|
|
Create an array
|
|
Remove an element from an array
|
|
Generates a new string from the apr_pool_t containing the concatenated sequence of substrings referenced as elements within the array. The string will be empty if all substrings are empty or null, or if there are no elements in the array. If sep is non-NUL, it will be inserted between elements as a separator.
|
|
Add a new element to an array
|
|
Determine if the array is empty
|
|
Determine if the table is empty
|
|
Add data to a table, regardless of whether there is another element with the same key.
|
|
Add data to a table, regardless of whether there is another element with the same key.
|
|
Delete all of the elements from a table
|
|
Eliminate redunandant entries in a table by either overwriting or merging duplicates
|
|
Create a new table and copy another table into it
|
|
Iterate over a table running the provided function once for every element in the table. If there is data passed in as a vararg, then the function is only run on those elements whose key matches something in the vararg. If the vararg is NULL, then every element is run through the function. Iteration continues while the function returns non-zero.
|
|
Get the elements from a table
|
|
Get the value associated with a given key from the table. After this call, The data is still in the table
|
|
Make a new table
|
|
Add data to a table by merging the value with data that has already been stored
|
|
Add data to a table by merging the value with data that has already been stored
|
|
Conceptually, apr_table_overlap does this: apr_array_header_t *barr = apr_table_elts(b); apr_table_entry_t *belt = (apr_table_entry_t *)barr->elts; int i; for (i = 0; i < barr->nelts; ++i) { if (flags & APR_OVERLAP_TABLES_MERGE) { apr_table_mergen(a, belt[i].key, belt[i].val); } else { apr_table_setn(a, belt[i].key, belt[i].val); } } Except that it is more efficient (less space and cpu-time) especially when b has many elements. Notice the assumptions on the keys and values in b -- they must be in an ancestor of a's pool. In practice b and a are usually from the same pool. |
|
Merge two tables into one new table
|
|
Add a key/value pair to a table, if another element already exists with the same key, this will over-write the old data.
|
|
Add a key/value pair to a table, if another element already exists with the same key, this will over-write the old data.
|
|
Remove data from the table
|
|
Iterate over a table running the provided function once for every element in the table. If there is data passed in as a vararg, then the function is only run on those element's whose key matches something in the vararg. If the vararg is NULL, then every element is run through the function. Iteration continues while the function returns non-zero.
|
|
Declaration prototype for the iterator callback function of apr_table_do() and apr_table_vdo().
|