home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
pbimporter.tcl
< prev
next >
Wrap
Text File
|
1997-03-25
|
2KB
|
94 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)pbimporter.tcl /main/hindenburg/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)pbimporter.tcl /main/hindenburg/3 25 Mar 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require pb_msg.tcl
require pboopl.tcl
require pbtarget.tcl
require pbgentor.tcl
# End user added include file section
require "importer.tcl"
Class PbImporter : {Importer} {
constructor
method destructor
method generateOopl
method getOoplFileTypesToGenerateFor
method import
}
constructor PbImporter {class this} {
set this [Importer::constructor $class $this]
# Start constructor user section
# End constructor user section
return $this
}
method PbImporter::destructor {this} {
# Start destructor user section
# End destructor user section
$this Importer::destructor
}
method PbImporter::generateOopl {this classes} {
set fileHandler [PBFileHandler new]
$fileHandler sourceTclFiles
set selectedClasses [List new]
foreach class $classes {
if [$class isExternal] {
continue
}
if {[$class getName] == ""} {
m4_warning $W_CLASS_WITHOUT_NAME
} else {
$selectedClasses append $class
}
}
set pbGenerator [PBGenerator new]
set generatedSections [$pbGenerator generate $selectedClasses]
$generatedSections foreach class classToSection {
$classToSection foreach type section {
$fileHandler writeSectionToFile $section $class $type
}
}
}
method PbImporter::getOoplFileTypesToGenerateFor {this} {
set fileHandler [PBFileHandler new]
return [[$fileHandler getFileTypes] contents]
}
method PbImporter::import {this} {
set cc [ClientContext::global]
set prevPhaseV [[$cc currentPhase] previous [$cc currentConfig]]
if [$prevPhaseV isNil] {
m4_error $E_NO_PREV_PHASE [$cc levelNameAt Phase]
return
}
set sysName "PBBuiltins"
set sysV [$prevPhaseV findSystemVersion $sysName "system"]
if [$sysV isNil] {
m4_error $E_NOBUILTINSYS $sysName
return
}
$this Importer::import
}
# Do not delete this line -- regeneration end marker