DTNMA Reference Tools v2.0.0 - 21.g58e5557
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
Descriptor for each built-in (ARI type) and semantic type within the AMM. More...
#include <typing.h>
Data Fields | ||
void(* | ari_name )(const cace_amm_type_t *self, cace_ari_t *name) | |
Get an ARI representation of a name for this type. | ||
cace_amm_type_match_res_t(* | match )(const cace_amm_type_t *self, const cace_ari_t *ari) | |
Determine if a specific value matches this type. | ||
int(* | convert )(const cace_amm_type_t *self, cace_ari_t *out, const cace_ari_t *in) | |
Convert a value to this type if possible. | ||
cace_amm_type_class_t | type_class | |
Determine which of the following union member is valid. | ||
union { | ||
struct cace_amm_type_builtin_s as_builtin | ||
Valid when type_class is CACE_AMM_TYPE_BUILTIN. | ||
void * as_semtype | ||
Non-null for all other cace_amm_type_s values. More... | ||
}; | ||
cace_amm_semtype_deinit_f | as_semtype_deinit | |
Descriptor for each built-in (ARI type) and semantic type within the AMM.
A typedef representing an AMM semantic type.
Users of this struct must treat it as opaque and not access any individual members directly, instead use cace_amm_type_set_* functions to set its state and other functions to access its state.
Both match and convert should be non-null for any type. Details about AMM typing are discussed in the page cace_amm_typing. This includes the valid possibility of circular references.
void(* cace_amm_type_t::ari_name) (const cace_amm_type_t *self, cace_ari_t *name) |
Get an ARI representation of a name for this type.
[in] | self | Pointer to the associated type object. |
[out] | name | The already initialized output object. |
void* cace_amm_type_t::as_semtype |
Non-null for all other cace_amm_type_s values.
Cast to specific internal configuration struct for each class of semantic type.
int(* cace_amm_type_t::convert) (const cace_amm_type_t *self, cace_ari_t *out, const cace_ari_t *in) |
Convert a value to this type if possible.
It is expected that many input values will not be convertible to any given type, which is indicated by the return value.
[in] | self | Pointer to the associated type object. |
[out] | out | The value to convert into. |
[in] | in | The value to convert from. |
cace_amm_type_match_res_t(* cace_amm_type_t::match) (const cace_amm_type_t *self, const cace_ari_t *ari) |
Determine if a specific value matches this type.
[in] | self | Pointer to the associated type object. |
[in] | ari | The value to check. |