|
DTNMA Reference Tools v2.1.0 - 2.ga9a44fe
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
This file contains definitions constraints on semantic type use. More...
Include dependency graph for semtype_cnst.h:
This graph shows which files directly or indirectly include this file:Data Structures | |
| struct | cace_amm_semtype_cnst_t |
| A single constraint on a cace_amm_semtype_use_t. More... | |
Macros | |
| #define | M_OPL_cace_amm_semtype_cnst_t() (INIT(API_2(cace_amm_semtype_cnst_init)), CLEAR(API_2(cace_amm_semtype_cnst_deinit))) |
| M*LIB OPLIST for cace_amm_semtype_cnst_t. | |
Enumerations | |
| enum | cace_amm_semtype_cnst_type_e { AMM_SEMTYPE_CNST_INVALID , AMM_SEMTYPE_CNST_STRLEN , AMM_SEMTYPE_CNST_TEXTPAT , AMM_SEMTYPE_CNST_RANGE_INT64 } |
| Types of constraints on a cace_amm_semtype_use_t. More... | |
Functions | |
| void | cace_amm_semtype_cnst_init (cace_amm_semtype_cnst_t *obj) |
| void | cace_amm_semtype_cnst_deinit (cace_amm_semtype_cnst_t *obj) |
| cace_amm_range_size_t * | cace_amm_semtype_cnst_set_strlen (cace_amm_semtype_cnst_t *obj) |
| Configure a constraint on text-string or byte-string size. | |
| int | cace_amm_semtype_cnst_set_textpat (cace_amm_semtype_cnst_t *obj, const char *pat) |
| Configure a constraint on text-string regular expression pattern. | |
| cace_amm_range_int64_t * | cace_amm_semtype_cnst_set_range_int64 (cace_amm_semtype_cnst_t *obj) |
| Configure a constraint on integer values based on signed 64-bit ranges. | |
| bool | cace_amm_semtype_cnst_is_valid (const cace_amm_semtype_cnst_t *obj, const cace_ari_t *val) |
| Determine if a specific value is valid according to a constraint. | |
This file contains definitions constraints on semantic type use.
Types of constraints on a cace_amm_semtype_use_t.
This library does not implement constraints for:
| bool cace_amm_semtype_cnst_is_valid | ( | const cace_amm_semtype_cnst_t * | obj, |
| const cace_ari_t * | val | ||
| ) |
Determine if a specific value is valid according to a constraint.
| [in] | obj | The constraint to check against. |
| [in] | val | The value to check. |
References AMM_SEMTYPE_CNST_INVALID, AMM_SEMTYPE_CNST_RANGE_INT64, AMM_SEMTYPE_CNST_STRLEN, AMM_SEMTYPE_CNST_TEXTPAT, cace_ari_t::as_lit, cace_amm_semtype_cnst_t::as_range_int64, cace_amm_semtype_cnst_t::as_strlen, cace_amm_semtype_cnst_t::as_textpat, CACE_ARI_PRIM_BSTR, CACE_ARI_PRIM_TSTR, CACE_LOG_DEBUG, cace_ari_t::is_ref, cace_data_t::len, cace_ari_lit_t::prim_type, cace_data_t::ptr, and cace_amm_semtype_cnst_t::type.
| cace_amm_range_int64_t * cace_amm_semtype_cnst_set_range_int64 | ( | cace_amm_semtype_cnst_t * | obj | ) |
Configure a constraint on integer values based on signed 64-bit ranges.
This applies to CACE_ARI_TYPE_BYTE, CACE_ARI_TYPE_INT, CACE_ARI_TYPE_UINT, CACE_ARI_TYPE_VAST, and a limited domain of CACE_ARI_TYPE_UVAST as well as untyped primitive integer values.
| [in,out] | obj | The struct to set the state of. |
References AMM_SEMTYPE_CNST_RANGE_INT64, cace_amm_semtype_cnst_t::as_range_int64, CHKNULL, and cace_amm_semtype_cnst_t::type.
| cace_amm_range_size_t * cace_amm_semtype_cnst_set_strlen | ( | cace_amm_semtype_cnst_t * | obj | ) |
Configure a constraint on text-string or byte-string size.
This applies to CACE_ARI_TYPE_TEXTSTR and CACE_ARI_TYPE_BYTESTR as well as untyped primitive text- and byte-strings.
| [in,out] | obj | The struct to set the state of. |
References AMM_SEMTYPE_CNST_STRLEN, cace_amm_semtype_cnst_t::as_strlen, CHKNULL, and cace_amm_semtype_cnst_t::type.
| int cace_amm_semtype_cnst_set_textpat | ( | cace_amm_semtype_cnst_t * | obj, |
| const char * | pat | ||
| ) |
Configure a constraint on text-string regular expression pattern.
This applies to CACE_ARI_TYPE_TEXTSTR as well as untyped primitive text strings.
pat parameter is the start- and end-anchored PCRE pattern, which conforms to the I-Regexp standard of RFC 9485 [rfc9485]. This pattern does not need to include leading "\A(?" or trailing ")\z" parts.| [in,out] | obj | The struct to set the state of. |
| [in] | pat | The regular expression to compile. |
References AMM_SEMTYPE_CNST_TEXTPAT, cace_amm_semtype_cnst_t::as_textpat, CACE_LOG_ERR, CHKERR1, and cace_amm_semtype_cnst_t::type.