DTNMA Reference Tools v2.0.0 - 7.g88e232c
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>
Public Types | |
enum | cace_amm_type_class_e { CACE_AMM_TYPE_INVALID , CACE_AMM_TYPE_BUILTIN , CACE_AMM_TYPE_USE , CACE_AMM_TYPE_ULIST , CACE_AMM_TYPE_DLIST , CACE_AMM_TYPE_UMAP , CACE_AMM_TYPE_TBLT , CACE_AMM_TYPE_UNION , CACE_AMM_TYPE_SEQ } |
Determine which of the following union member is valid. More... | |
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. | ||
enum cace_amm_type_s::cace_amm_type_class_e | type_class | |
union { | ||
struct cace_amm_type_builtin_s as_builtin | ||
Valid when type_class is cace_amm_type_s::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.
Determine which of the following union member is valid.
Enumerator | |
---|---|
CACE_AMM_TYPE_INVALID | An initialized but not valid type. |
CACE_AMM_TYPE_BUILTIN | A built-in type using the as_builtin member. |
CACE_AMM_TYPE_USE | An augmented use of another type using the as_semtype member. |
CACE_AMM_TYPE_ULIST | A uniform list using the as_semtype member. |
CACE_AMM_TYPE_DLIST | A diverse list using the as_semtype member. |
CACE_AMM_TYPE_UMAP | A uniform map using the as_semtype member. |
CACE_AMM_TYPE_TBLT | A table template using the as_semtype member. |
CACE_AMM_TYPE_UNION | A union type using the as_semtype member. |
CACE_AMM_TYPE_SEQ | A sub-sequence using the as_semtype member. |
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. |