home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
langcheck.tcl
< prev
next >
Wrap
Text File
|
1997-10-20
|
4KB
|
128 lines
###########################################################################
##
## Copyright (c) 1996 by Cadre Technologies Inc.
## and Scientific Toolworks 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.
## or Scientific Toolworks Inc.
##
###########################################################################
puts "\nAda83 Diagram Checker"
require a83genmsg.tcl
source [m4_path_name tcl ada_funcs.tcl]
#
# miscellaneous utility procedures:
#
proc ada_notes {notes_txt} {
m4_fmt_message "NOTES: (Ada) $notes_txt\n"
}
#
# method CMCmnClass::checkClassAttributes
#
rename CMCmnClass::checkClassAttributes CMCmnClass::orgCheckClassAttributes
method CMCmnClass::checkClassAttributes {this} {
CMCmnClass::orgCheckClassAttributes $this
set dataAttribs [$this findDataAttrs 1]
foreach attrib $dataAttribs {
set access [get_attrib_access $attrib]
if {"$access" != "" && "$access" != "Public-Public"} {
set class_visibility [get_class_visibility $this]
if {"$class_visibility" == "" || "$class_visibility" == "Public"} {
m4_error $E_PUBCLASSPRIVATTR [get_name $this] [get_name $attrib] [get_attrib_access $attrib]
}
}
}
set assocAttribs [$this findAssocAttrs 1]
foreach attrib $assocAttribs {
set access [get_attrib_access $attrib]
if {"$access" != "" && "$access" != "Public-Public"} {
set class_visibility [get_class_visibility $this]
if {"$class_visibility" == "" || "$class_visibility" == "Public"} {
m4_error $E_PUBCLASSPRIVASSOC [get_name $this] [get_name $attrib] [get_attrib_access $attrib]
}
}
if {[get_opposite $attrib] != ""} {
set type [get_type $attrib]
if {[get_class_visibility $this] != "Opaque" || \
[get_class_visibility $type] != "Opaque"} {
m4_error $E_BIDIRASSOC [get_name $this] [get_name $type]
}
}
}
}
#
# Redefine method CMCmnClass::checkClassOperations
#
rename CMCmnClass::checkClassOperations CMCmnClass::orgCheckClassOperations
method CMCmnClass::checkClassOperations {this} {
CMCmnClass::orgCheckClassOperations {this}
set opers [$this operationSet]
foreach oper $opers {
set name [get_name $oper]
if {[is_oper $name]} {
set type [get_type $oper]
if {[get_name $type] == ""} {
m4_error $E_OPERNORETTYPE $name [get_name $this]
}
}
}
}
#
# method CMParamter::mcheck {this oper class}
#
rename CMParameter::mcheck CMParameter::orgMcheck
method CMParameter::mcheck {this oper class} {
CMParameter::orgMcheck $this $oper $class
set type [get_type $oper]
if {[get_name $type] != ""} {
if {[get_param_dfd $this] != "" && [get_param_dfd $this] != "in"} {
m4_error $E_OPERPARAMNOTIN [get_name $this] [get_name $oper] [get_name $type]
}
}
}
#
# redefined procedures from product-tcl/check_conf.tcl:
#
#
# procedure add_predefined_methods
#
proc add_predefined_methods {ooplmodel} {
#
# Call user-supplied function to add methods
#
if {[info procs add_user_defined_methods] != ""} {
add_user_defined_methods $ooplmodel
}
}
#
# redefine method CDMDataAttr::prepare
#
method CMDataAttr::prepare {this class model forwhat} {
}