-lttv_key *lttv_key_new();
-
-void lttv_key_destroy(lttv_key *k);
-
-/* macro to access/replace a the i th component of key k */
-
-#define lttv_key_index(k,i) _lttv_key_index(k,i)
-
-
-/* Append a new component */
-
-void lttv_key_append(lttv_key *k, lttv_string_id i);
-
-
-/* Number of components in a key */
-
-unsigned int lttv_key_number(lttv_key *k);
-
-
-/* It is also possible to create a key directly from a pathname,
- key components separated by /, (e.g., "/hooks/options/before"). */
-
-lttv_key *lttv_key_new_pathname(const char *pathname);
-
-
-/* Create a new set of attributes */
-
-lttv_attributes *lttv_attributes_new();
-
-
-/* Destroy the set of attributes including all the memory allocated
- internally for it (copies of keys, and integer, double and time
- values...). */
-
-void lttv_attributes_destroy(lttv_attributes *a);
-
-
-/* Total number of attributes in a lttv_attributes. */
-
-unsigned int lttv_attributes_number(lttv_attributes *a);
-
-
-/* Obtain a pointer to the value of the corresponding type associated with
- the specified key. New values are created on demand with 0 as initial
- value. These values are freed when the attributes set is destroyed. */
-
-int *lttv_attributes_get_integer(lttv_attributes *a, lttv_key *k);
-
-lttv_time *lttv_attributes_get_time(lttv_attributes *a, lttv_key *k);
-
-double *lttv_attributes_get_double(lttv_attributes *a, lttv_key *k);
-
-
-/* Set or get the pointer value associated with the specified key.
- NULL is returned if no pointer was set for the key. */
-
-void *lttv_attributes_get_pointer(lttv_attributes *a, lttv_key *k);
-
-void lttv_attributes_set_pointer(lttv_attributes *a, lttv_key *k, void *p);
-
-void *lttv_attributes_get_pointer_pathname(lttv_attributes *a, char *pn);
-
-void lttv_attributes_set_pointer_pathname(lttv_attributes *a,char *pn,void *p);
-
-
-/* It is often useful to copy over some elements from the source attributes
- table to the destination table. While doing so, constraints on each key
- component may be used to select the elements of interest. Finally, some
- numerical elements may need to be summed, for example summing the number
- of page faults over all processes. A flexible function to copy attributes
- may be used for all these operations.
-
- If the key of the element copied already exists in the destination
- attributes, numerical values (integer, double or time) are summed and
- pointers are replaced.
-
- The lttv_key_select_data structure specifies for each key component the
- test applied to decide to copy or not the corresponding element.
- It contains the relation to apply to each key component, the rel vector,
- and the comparison key, both of size length. To decide if an element
- should be copied, each component of its key is compared with the
- comparison key, and the relation specified for each component must
- be verified. The relation ANY is always verified and the comparison key
- component is not used. The relation NONE is only verified if the key
- examined contains fewer components than the position examined. The EQ, NE,
- LT, LE, GT, GE relations are verified if the key is long enough and the
- component satisfies the relation with respect to the comparison key.
- Finally, the CUT relation is satisfied if the key is long enough, but the
- element is copied with that component removed from its key. All the keys
- which only differ by that component become identical after being shortened
- and their numerical values are thus summed when copied. */
-
-typedef enum _lttv_key_select_relation
-{ LTTV_KEY_ANY, /* Any value is good */
- LTTV_KEY_NONE, /* No value is good, i.e. the key must be shorter */
- LTTV_KEY_EQ, /* key[n] is equal to match[n] */
- LTTV_KEY_NE, /* key[n] is not equal to match[n] */
- LTTV_KEY_LT, /* key[n] is lower than match[n] */
- LTTV_KEY_LE, /* key[n] is lower or equal than match[n] */
- LTTV_KEY_GT, /* key[n] is greater than match[n] */
- LTTV_KEY_GE, /* key[n] is greater or equal than match[n] */
- LTTV_KEY_CUT /* cut key[n], shortening the key for the copy */
-} lttv_key_select_relation;
-
-typedef struct _lttv_key_select_data
-{
- unsigned length;
- lttv_key_select_relation *rel;
- lttv_key *comparison;
-} lttv_key_select_data;
-
-void lttv_attributes_copy(lttv_attributes *src, lttv_attributes *dest,
- lttv_key_select_data d);