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 Cadre Technologies Inc.
- #
- #---------------------------------------------------------------------------
- #
- # File : @(#)ne_const.tcl 1.2
- # Original date : 26-10-1994
- # Description : NewEra generator constants
- #
- #---------------------------------------------------------------------------
- #
-
- # Name of type column in database
- #
- global TYPE_ID_NM
- set TYPE_ID_NM class_type
-
- #
- # Regeneration magic strings
- #
- global START_INCLUDE_MESSAGE
- set START_INCLUDE_MESSAGE "-- Start user added include file section"
- global END_INCLUDE_MESSAGE
- set END_INCLUDE_MESSAGE "-- End user added include file section"
- global START_CTOR_MESSAGE
- set START_CTOR_MESSAGE "-- Start constructor user section"
- global END_CTOR_MESSAGE
- set END_CTOR_MESSAGE "-- End constructor user section"
- global START_DTOR_MESSAGE
- set START_DTOR_MESSAGE "-- Start destructor user section"
- global END_DTOR_MESSAGE
- set END_DTOR_MESSAGE "-- End destructor user section"
- global START_SOURCE_MESSAGE
- set START_SOURCE_MESSAGE "-- Start user added source code section"
- global END_SOURCE_MESSAGE
- set END_SOURCE_MESSAGE "-- End user added source code section"
-
- # regeneration stops after this marker is found
- #
- global REGEN_END
- set REGEN_END "-- Do not delete this line -- regeneration end marker"
-
- #
- # Configuration functions
- #
-
- # Return the file name for a class name
- #
- proc class2file {name} {
- return $name
- }
-
- proc h_class2file {name} {
- return [class2file $name].4gh
- }
-
- # Generate an INCLUDE statement for 'class' in 'sect'
- #
- proc gen_include {class sect} {
- set filename [class2file $class].4gh
- gen_include_filename $filename $sect
- }
-
- proc gen_include_filename {filename sect} {
- if [string match ix* $filename] {
- set sysincl "SYSTEM "
- } else {
- set sysincl ""
- }
- expand_text $sect {
- INCLUDE ~${sysincl}"~$filename"
- }
- }
-
- # The "reference" name for 'class'
- #
- proc reference_name {class} {
- return "${class}Ref"
- }
-
- # The set name for 'class'
- #
- proc set_name {class} {
- return "${class}Set"
- }
-
- # The set type name for 'class'
- #
- proc set_type_name {class} {
- add_hdr_inc_name ${set::name}
- return ${set::name}
- }
-
- # The ordered set name for 'class'
- #
- proc oset_name {class} {
- return "${class}OSet"
- }
-
- # The ordered set type name for 'class'
- #
- proc oset_type_name {class} {
- add_hdr_inc_name ${oset::name}
- return ${oset::name}
- }
-
- # The dict name for 'class'
- #
- proc dict_name {class} {
- return "${class}Dict"
- }
-
- # The dict type name for 'key' and 'value'
- #
- proc dict_type_name {key_type value_type} {
- add_hdr_inc_name ${dict::name}
- return ${dict::name}
- }
-
- # The set dict name for 'class'
- #
- proc set_dict_name {class} {
- return "${class}RSDict"
- }
-
- # The set dict type name for 'key' and 'value'
- #
- proc set_dict_type_name {key_type value_type} {
- add_hdr_inc_name ${rsdict::name}
- return ${rsdict::name}
- }
-
- # The ordered set dict name for 'class'
- #
- proc oset_dict_name {class} {
- return "${class}ORSDict"
- }
-
- # The ordered set dict type name for 'key' and 'value'
- #
- proc oset_dict_type_name {key_type value_type} {
- add_hdr_inc_name ${orsdict::name}
- return ${orsdict::name}
- }
-
-