|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
#include "type.h"#include "cace/util/defs.h"#include "cace/util/nocase.h"#include <m-dict.h>#include <pthread.h>#include <stddef.h>
Include dependency graph for type.c:Data Structures | |
| struct | _ari_type_name_pair_t |
Functions | |
| static void | _ari_type_dict_init (void) |
| Initializer for #amm_builtin_dict. | |
| const char * | cace_ari_type_to_name (int32_t typenum) |
| Lookup a type ID from its integer enumeration. | |
| int | cace_ari_type_from_name (int32_t *typenum, const char *name) |
| Lookup a type ID from its text name. | |
Variables | |
| static _ari_type_name_pair_t | _ari_type_names [] |
| Map from non-negative literal type enumerations to names. | |
| static _ari_type_by_id_t | _ari_type_id_dict |
| Cached type dictionary. | |
| static _ari_type_by_name_t | _ari_type_name_dict |
| static pthread_once_t | _ari_type_dict_ctrl = PTHREAD_ONCE_INIT |
| Guard for amm_builtin_dict_init() | |
|
static |
Initializer for #amm_builtin_dict.
References _ari_type_id_dict, _ari_type_name_dict, _ari_type_names, _ari_type_name_pair_t::name, and _ari_type_name_pair_t::type.
Referenced by cace_ari_type_from_name(), and cace_ari_type_to_name().
| int cace_ari_type_from_name | ( | int32_t * | typenum, |
| const char * | name | ||
| ) |
Lookup a type ID from its text name.
| [out] | typenum | The integer value to store the found result. A null value means just search but don't store. |
| [in] | name | The name to search for. |
References _ari_type_dict_ctrl, _ari_type_dict_init(), _ari_type_name_dict, and CHKERR1.
Referenced by cace_amm_type_set_name_aritype(), and cace_ari_objpath_derive_type().
| const char * cace_ari_type_to_name | ( | int32_t | typenum | ) |
Lookup a type ID from its integer enumeration.
| typenum | The integer value to search for. |
References _ari_type_dict_ctrl, _ari_type_dict_init(), and _ari_type_id_dict.
Referenced by cace_ari_objpath_derive_type(), cace_ari_objpath_set_textid_opt(), cace_ari_set_aritype_text(), cace_ari_text_encode_aritype(), refda_agent_bindrefs(), refda_binding_obj(), test_amm_type_get_name_builtin(), and test_ari_text_encode_ariref().
|
static |
Guard for amm_builtin_dict_init()
Referenced by cace_ari_type_from_name(), and cace_ari_type_to_name().
|
static |
Cached type dictionary.
Referenced by _ari_type_dict_init(), and cace_ari_type_to_name().
|
static |
Referenced by _ari_type_dict_init(), and cace_ari_type_from_name().
|
static |
Map from non-negative literal type enumerations to names.
These are from the IANA sub-registries "Literal Types" and "Managed Object Types" from [IANA:DTNMA].
Referenced by _ari_type_dict_init().