home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # Copyright (c) 1993-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 Westmount Technology B.V.
- #
- #---------------------------------------------------------------------------
- #
- # File : @(#)genne.tcl /main/hindenburg/2
- # Original date : 19-10-1994
- # Description : Generate NewEra : entry point
- #
- #---------------------------------------------------------------------------
- #
-
- require wmt_util.tcl
- require ne_const.tcl
- require ne_config.tcl
- require ne_class.tcl
- require ne_funcs.tcl
- require gen_db_fnc.tcl
- require oopl_disp.tcl
- require ne_regen.tcl
- require gen_db_def.tcl
- require libsql.tcl
-
- require ixval.tcl
- require libnesql.tcl
- require genwif.tcl
-
- global comment_string; set comment_string(ne) "--"
- set cc [ClientContext::global]
-
- proc before_generate {} {
- add_column_nr_attrs
- }
-
- proc generate_ne {} {
- find_file_types
-
- set systemName [getCurrentSystemName]
- set tgt_objs [get_tgt_objs]
- if [lempty $tgt_objs] {
- # import new
- global skip_file
- set file_list\
- "$fourgl_type $fourgh_type $wif_type $wif_tmpl_type"
- set old_files [fstorage::dir $file_list]
- foreach file $old_files {
- set skip_file($file) 1
- }
- generate [$oomodel ooplModel]
- } else {
- # import selected
- global gen_file
- set do_ne 0
- foreach file $tgt_objs {
- set gen_file($file) 1
- set type [nt_get_type $file]
- if {"$type" == "$fourgl_type" ||
- "$type" == "$fourgh_type" ||
- "$type" == "$wif_type" ||
- "$type" == "$wif_tmpl_type" } {
- set do_ne 1
- }
- }
- if $do_ne {
- generate [$oomodel ooplModel]
- }
- }
- }
-
- # Search for user defined Tcl files and "source" them. Tcl files are sourced
- # in the following order:
- # - customization file u_genne.tcl
- # - all tcl files in the system named "Tcl"
- # - all tcl files in the current system
-
-
- # "Source" a tcl file
- #
- proc source_tcl_file {file} {
- if [catch {source $file}] {
- m4_error $E_USER_TCL $file
- puts stderr $errorInfo
- }
- }
-
- # "Source" all tcl files in the current system
- #
- proc source_all_tcl_files {} {
- foreach file [fstorage::dir tcl] {
- source_tcl_file [fstorage::get_uenv_path $file absolute]
- }
- }
-
- # "Source" all tcl files in the system named "Tcl"
- #
- proc source_files_in_tcl_sys {} {
- set clientCont [ClientContext::global]
- set origSys [$clientCont levelNameAt System]
- if [catch {fstorage::goto_system Tcl.system}] {
- return
- }
- source_all_tcl_files
- fstorage::goto_system $origSys
- }
-
- if {[$cc customFileExists u_genne tcl "" 0]} {
- require u_genne.tcl
- }
-
- before_generate
-
- source_files_in_tcl_sys
- source_all_tcl_files
-
- generate_ne
-