Mapping related methods.
More...
#include <stddef.h>
#include <stdint.h>
#include "types.h"
Go to the source code of this file.
|
|
typedef struct actf_mappings | actf_mappings |
| | Mappings map names to integer range sets.
|
◆ actf_mappings_len()
Get the number of mappings.
- Parameters
-
- Returns
- the number of mappings in maps
◆ actf_mappings_find_uint()
Find the next name matching the provided value.
A value can be mapped to several names, so to read them all out, you should call actf_mappigns_find_uint() repeatedly with the same iterator until NULL is returned.
- Parameters
-
| maps | the mappings |
| val | the value |
| it | the iterator to use, it must be zero initialized on the first call and then unmodified for subsequent calls. |
- Returns
- a name or NULL if no more matches exist.
◆ actf_mappings_find_first_uint()
| const char * actf_mappings_find_first_uint |
( |
const actf_mappings * | maps, |
|
|
uint64_t | val ) |
Find the first name matching the provided value.
Convenience function for when you only care about the first matching name.
- Parameters
-
| maps | the mappings |
| val | the value |
- Returns
- the name or NULL if no matches exist
◆ actf_mappings_find_sint()
◆ actf_mappings_find_first_sint()
| const char * actf_mappings_find_first_sint |
( |
const actf_mappings * | maps, |
|
|
int64_t | val ) |