From 5fa0463fc631e6014a5835457a507a8855083441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Doser?= Date: Tue, 27 Sep 2005 09:20:59 +0000 Subject: [PATCH] added helper function to check whether a class has a given stereotype git-svn-id: https://projects.brucker.ch/su4sml/svn/infsec-import/trunk/src/su4sml@3141 3260e6d1-4efc-4170-b0a7-36055960796d --- src/xmi_idtable.sml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xmi_idtable.sml b/src/xmi_idtable.sml index d761ad4..7a29b66 100644 --- a/src/xmi_idtable.sml +++ b/src/xmi_idtable.sml @@ -343,6 +343,12 @@ fun class_taggedvalue_of table tag (XMI.Class c) = | class_taggedvalue_of table tag _ = raise IllFormed "class_taggedvalues_of called on an argument that doesn't support tagged values yet..." +(* check whether a class has the given stereotype *) +fun classifier_has_stereotype t st c = + List.exists (fn x => (find_stereotype t x) = st) + (XMI.classifier_stereotype_of c) + + (* split an association into association ends, and put the association ends *) (* ends into the xmi.id table under the corresponding (i.e., opposite) *)