DTNMA Reference Tools v2.0.0 - 21.g58e5557
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
This file contains definitions for AMM semantic typing of ARI values. More...
#include "typing.h"
#include "named_type.h"
#include "range.h"
#include "semtype_cnst.h"
#include <m-array.h>
Data Structures | |
struct | cace_amm_semtype_use_t |
Configuration for an augmented use of another type. More... | |
struct | cace_amm_semtype_ulist_t |
Configuration for a uniform list within an AC. More... | |
struct | cace_amm_semtype_dlist_t |
Configuration for a diverse list within an AC. More... | |
struct | cace_amm_semtype_umap_t |
Configuration for a uniform list within an AM. More... | |
struct | cace_amm_semtype_tblt_t |
Configuration for a table template. More... | |
struct | cace_amm_semtype_union_t |
Configuration for a union of other types. More... | |
struct | cace_amm_semtype_seq_t |
Configuration for a sub-sequence list within an AC. More... | |
Typedefs | |
typedef struct cace_amm_lookup_s | cace_amm_lookup_t |
typedef struct cace_amm_obj_store_s | cace_amm_obj_store_t |
Functions | |
static void | cace_amm_semtype_use_init (cace_amm_semtype_use_t *obj) |
static void | cace_amm_semtype_use_deinit (cace_amm_semtype_use_t *obj) |
cace_amm_semtype_use_t * | cace_amm_type_set_use (cace_amm_type_t *type) |
Create a default initialized type use. | |
int | cace_amm_type_set_use_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a named config from its serialized name. | |
void | cace_amm_type_set_use_ref (cace_amm_type_t *type, const cace_ari_t *name) |
Create a use type based on a type reference. | |
void | cace_amm_type_set_use_ref_move (cace_amm_type_t *type, cace_ari_t *name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the name with move semantics. | |
int | cace_amm_type_set_use_builtin (cace_amm_type_t *type, cace_ari_type_t ari_type) |
Create a use type based on a base type object. | |
static void | cace_amm_semtype_ulist_init (cace_amm_semtype_ulist_t *obj) |
static void | cace_amm_semtype_ulist_deinit (cace_amm_semtype_ulist_t *obj) |
cace_amm_semtype_ulist_t * | cace_amm_type_set_ulist (cace_amm_type_t *type) |
Create a uniform list semantic type. | |
int | cace_amm_type_set_ulist_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
static void | cace_amm_semtype_dlist_init (cace_amm_semtype_dlist_t *obj) |
static void | cace_amm_semtype_dlist_deinit (cace_amm_semtype_dlist_t *obj) |
cace_amm_semtype_dlist_t * | cace_amm_type_set_dlist (cace_amm_type_t *type, size_t num_types) |
Create a diverse list semantic type. | |
int | cace_amm_type_set_dlist_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a diverse list config from its serialized name. | |
static void | cace_amm_semtype_umap_init (cace_amm_semtype_umap_t *obj) |
static void | cace_amm_semtype_umap_deinit (cace_amm_semtype_umap_t *obj) |
cace_amm_semtype_umap_t * | cace_amm_type_set_umap (cace_amm_type_t *type) |
Create a uniform map semantic type. | |
int | cace_amm_type_set_umap_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a uniform map config from its serialized name. | |
static void | cace_amm_semtype_tblt_init (cace_amm_semtype_tblt_t *obj) |
static void | cace_amm_semtype_tblt_deinit (cace_amm_semtype_tblt_t *obj) |
cace_amm_semtype_tblt_t * | cace_amm_type_set_tblt_size (cace_amm_type_t *type, size_t num_cols) |
Create a table template based on a set of typed columns. | |
int | cace_amm_type_set_tblt_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a table template config from its serialized name. | |
static void | cace_amm_semtype_union_init (cace_amm_semtype_union_t *obj) |
static void | cace_amm_semtype_union_deinit (cace_amm_semtype_union_t *obj) |
cace_amm_semtype_union_t * | cace_amm_type_set_union_size (cace_amm_type_t *type, size_t num_choices) |
Create a union type based on a choice of other type objects. | |
int | cace_amm_type_set_union_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a union config from its serialized name. | |
static void | cace_amm_semtype_seq_init (cace_amm_semtype_seq_t *obj) |
static void | cace_amm_semtype_seq_deinit (cace_amm_semtype_seq_t *obj) |
cace_amm_semtype_seq_t * | cace_amm_type_set_seq (cace_amm_type_t *type) |
Create a sub-sequence list semantic type. | |
int | cace_amm_type_set_seq_from_name (cace_amm_type_t *type, const cace_amm_lookup_t *deref, const cace_amm_obj_store_t *store) |
Read a sub-sequence from its serialized name. | |
This file contains definitions for AMM semantic typing of ARI values.
cace_amm_semtype_dlist_t * cace_amm_type_set_dlist | ( | cace_amm_type_t * | type, |
size_t | num_types | ||
) |
Create a diverse list semantic type.
[out] | type | The type to initialize and populate. |
num_cols | The number of types to initialize. |
References CACE_AMM_TYPE_DLIST, CACE_MALLOC, CHKNULL, and cace_amm_semtype_dlist_t::types.
int cace_amm_type_set_dlist_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a diverse list config from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, CACE_LOG_ERR, cace_ari_ac_t::items, cace_ari_itemized_t::named, and cace_amm_semtype_dlist_t::types.
cace_amm_semtype_seq_t * cace_amm_type_set_seq | ( | cace_amm_type_t * | type | ) |
Create a sub-sequence list semantic type.
[out] | type | The type to initialize and populate. |
References CACE_AMM_TYPE_SEQ, CACE_MALLOC, and CHKNULL.
int cace_amm_type_set_seq_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a sub-sequence from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, CACE_LOG_ERR, cace_amm_semtype_seq_t::item_type, and cace_ari_itemized_t::named.
int cace_amm_type_set_tblt_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a table template config from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, CACE_LOG_ERR, cace_amm_semtype_tblt_t::columns, cace_ari_tbl_t::items, cace_amm_named_type_t::name, cace_ari_itemized_t::named, cace_ari_tbl_t::ncols, and cace_amm_named_type_t::typeobj.
cace_amm_semtype_tblt_t * cace_amm_type_set_tblt_size | ( | cace_amm_type_t * | type, |
size_t | num_cols | ||
) |
Create a table template based on a set of typed columns.
[out] | type | The type to initialize and populate. |
num_cols | The number of columns to initialize. |
References CACE_AMM_TYPE_TBLT, CACE_MALLOC, CHKNULL, and cace_amm_semtype_tblt_t::columns.
cace_amm_semtype_ulist_t * cace_amm_type_set_ulist | ( | cace_amm_type_t * | type | ) |
Create a uniform list semantic type.
[out] | type | The type to initialize and populate. |
References CACE_AMM_TYPE_ULIST, CACE_MALLOC, and CHKNULL.
cace_amm_semtype_umap_t * cace_amm_type_set_umap | ( | cace_amm_type_t * | type | ) |
Create a uniform map semantic type.
[out] | type | The type to initialize and populate. |
References CACE_AMM_TYPE_UMAP, CACE_MALLOC, and CHKNULL.
int cace_amm_type_set_umap_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a uniform map config from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, CACE_LOG_ERR, cace_amm_semtype_umap_t::key_type, cace_ari_itemized_t::named, and cace_amm_semtype_umap_t::val_type.
int cace_amm_type_set_union_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a union config from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, CACE_LOG_ERR, cace_amm_semtype_union_t::choices, cace_ari_ac_t::items, and cace_ari_itemized_t::named.
cace_amm_semtype_union_t * cace_amm_type_set_union_size | ( | cace_amm_type_t * | type, |
size_t | num_choices | ||
) |
Create a union type based on a choice of other type objects.
A union type contains a list of underlying types to choose from.
[out] | type | The type to initialize and populate. |
num_choices | The number of choices to initialize. |
References CACE_AMM_TYPE_UNION, CACE_MALLOC, CHKNULL, and cace_amm_semtype_union_t::choices.
cace_amm_semtype_use_t * cace_amm_type_set_use | ( | cace_amm_type_t * | type | ) |
Create a default initialized type use.
A use type adds annotations and constraints onto a base type.
[out] | type | The type to initialize and populate. |
[in] | name | The ARITYPE literal or TYPEDEF reference value. |
References CACE_AMM_TYPE_USE, CACE_MALLOC, and CHKNULL.
int cace_amm_type_set_use_builtin | ( | cace_amm_type_t * | type, |
cace_ari_type_t | ari_type | ||
) |
Create a use type based on a base type object.
A use type adds annotations and constraints onto a base type.
[out] | type | The type to initialize and populate. |
ari_type | The builtin type to create a use of. |
References cace_amm_semtype_use_t::base, and CACE_ARI_INIT_UNDEFINED.
int cace_amm_type_set_use_from_name | ( | cace_amm_type_t * | type, |
const cace_amm_lookup_t * | deref, | ||
const cace_amm_obj_store_t * | store | ||
) |
Read a named config from its serialized name.
[in,out] | type | The object to populate. |
[in] | deref | The name to draw parameters from. |
References cace_amm_lookup_t::aparams, cace_ari_set_copy(), CACE_LOG_ERR, cace_amm_semtype_use_t::name, and cace_ari_itemized_t::named.
void cace_amm_type_set_use_ref | ( | cace_amm_type_t * | type, |
const cace_ari_t * | name | ||
) |
Create a use type based on a type reference.
[out] | type | The type to initialize and populate. |
[in] | name | The ARITYPE literal or TYPEDEF reference value. |
References cace_ari_set_copy(), CHKVOID, and cace_amm_semtype_use_t::name.