Skip to content

Commit

Permalink
Add 'cowl_{obj,data}_card_is_qualified'
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanoBilenchi committed Aug 30, 2024
1 parent f78690d commit 6fd61b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/cowl_data_card.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ CowlCardType cowl_data_card_get_type(CowlDataCard *restr) {
return (CowlCardType)(cowl_get_type(restr) - COWL_OT_CE_DATA_MIN_CARD);
}

/**
* Checks if the specified data property cardinality restriction has a range.
*
* @param restr The restriction.
* @return True if the restriction has a range, false otherwise.
*/
COWL_PURE
COWL_INLINE
bool cowl_data_card_is_qualified(CowlDataCard *restr) {
return cowl_has_opt_field(restr);
}

/**
* Gets the property of the restriction.
*
Expand Down
12 changes: 12 additions & 0 deletions include/cowl_obj_card.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ CowlCardType cowl_obj_card_get_type(CowlObjCard *restr) {
return (CowlCardType)(cowl_get_type(restr) - COWL_OT_CE_OBJ_MIN_CARD);
}

/**
* Checks if the specified object property cardinality restriction has a filler.
*
* @param restr The restriction.
* @return True if the restriction has a filler, false otherwise.
*/
COWL_PURE
COWL_INLINE
bool cowl_obj_card_is_qualified(CowlObjCard *restr) {
return cowl_has_opt_field(restr);
}

/**
* Gets the property of the restriction.
*
Expand Down

0 comments on commit 6fd61b5

Please sign in to comment.