home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # Copyright (c) 1994-1995 by Cadre Technologies Inc.
- #
- # This software is furnished under a license and may be used only in
- # accordance with the terms of such license and with the inclusion of
- # the above copyright notice. This software or any other copies thereof
- # may not be provided or otherwise made available to any other person.
- # No title to and ownership of the software is hereby transferred.
- #
- # The information in this software is subject to change without notice
- # and should not be construed as a commitment by Cadre Technologies Inc.
- #
- #---------------------------------------------------------------------------
- #
- # File : @(#)chk_funcs.tcl 2.1
- # Author : edri
- # Original date : 11-10-94
- # Description : Functions for "check"
- #
- #---------------------------------------------------------------------------
- #
-
- proc oopl_model::check {model {diagram ""}} {
- foreach class [getSelectedOoplClasses $model] {
- if {[$class isSynthetic] != "1"} {
- if [$class isExternal] {
- puts stdout "\nClass '[$class getName]'\
- is external, not checked."
- continue
- }
- check $class $diagram
- }
- }
-
- foreach subject [getSelectedOoplSubjects $model $diagram] {
- m4_message $M_CHECKING_SUBJECT [$subject getName]
- check $subject $diagram
- }
- }
-
- proc class::check {class diagram} {
- m4_message $M_CHECKING_CLASS [$class getName]
-
- check_direct_supers $class
- check_class_attributes $class
- check_class_associations $class
-
- foreach f [$class featureSet] {
- if {[$f isSynthetic] != "1"} {
- check $f $class
- }
- }
-
- foreach e [$class receivedEventSet] {
- if {$diagram != "" && ![in_diagram $e $diagram]} {
- continue
- }
- check $e $class $diagram
- }
- }
-
- proc class_enum::check {class diagram} {
- m4_message $M_CHECKING_CLASS [$class getName]
- check_special_class $class $diagram
- }
-
- proc class_typedef::check {class diagram} {
- m4_message $M_CHECKING_CLASS [$class getName]
- check_special_class $class $diagram
- }
-
- proc class_generic_typedef::check {class diagram} {
- m4_message $M_CHECKING_CLASS [$class getName]
- check_special_class $class $diagram
- }
-
- proc link_class::check {class diagram} {
- class::check $class $diagram
- }
-
- proc data_attrib::check {attrib class} {
- # nop
- }
-
- proc assoc_attrib::check {attrib class} {
- # nop
- }
-
- proc qual_assoc_attrib::check {attrib class} {
- assoc_attrib::check $attrib $class
- }
-
- proc rv_link_attrib::check {attrib class} {
- assoc_attrib::check $attrib $class
- }
-
- proc link_attrib::check {attrib class} {
- assoc_attrib::check $attrib $class
- }
-
- proc qual_link_attrib::check {attrib class} {
- qual_assoc_attrib::check $attrib $class
- }
-
- proc operation::check {oper class} {
- set name [$class getName]
- if {[$oper getName] == $name} {
- m4_error $E_ILLEGAL_CONSTRUCTOR $name
- }
-
- foreach p [get_parameters $oper] {
- check $p $oper $class
- }
- }
-
- proc constructor::check {ctor class} {
- operation::check $ctor $class
- }
-
- proc parameter::check {param oper class} {
- # nop
- }
-
- proc ctor_param::check {param oper class} {
- parameter::check $param $oper $class
- }
-
- #
- # Dispatcher for received_events.
- #
- proc received_event::check {e class diagram} {
- if {$diagram != "" && ![in_diagram $e $diagram]} {
- return
- }
- [$e getEventType]::check $e $class $diagram
- }
-
- proc trace_event::check {e class diagram} {
- check_event_attributes $e $class
- check_corr_ccd_message $e $class $diagram
- check_etd_times $e $class $diagram
- check_method_for_event $e $class $diagram
- }
-
- proc internal_event::check {e class diagram} {
- check_method_for_event $e $class $diagram
- }
-
- proc internal_action::check {e class diagram} {
- check_method_for_event $e $class $diagram
- }
-
- proc internal_activity::check {e class diagram} {
- check_method_for_event $e $class $diagram
- }
-
- proc external_event::check {e class diagram} {
- check_event_attributes $e $class
- check_method_for_event $e $class $diagram
- }
-
- proc external_action::check {e class diagram} {
- check_method_for_event $e $class $diagram
- }
-
- proc event_message::check {e class diagram} {
- check_event_attributes $e $class
- check_method_for_event $e $class $diagram
- }
-
- proc comm_message::check {e class diagram} {
- check_method_for_event $e $class $diagram
- }
-
- proc subject::check {subject diagram} {
- m4_error $E_INVALID_SUBJECT [$subject getName] $diagram
- }
-
- proc cad_subject::check {subject diagram} {
- check_cad_subject $subject
- }
-
- proc ccd_subject::check {subject diagram} {
- check_ccd_subject $subject
- }
-
- proc cad_ccd_subject::check {subject diagram} {
- cad_subject::check $subject $diagram
- ccd_subject::check $subject $diagram
- }
-
- proc system_subject::check {subject diagram} {
- check_system_subject $subject
- }
-