home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
vbimporter.tcl
< prev
next >
Wrap
Text File
|
1997-07-16
|
3KB
|
109 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)vbimporter.tcl /main/titanic/5
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)vbimporter.tcl /main/titanic/5 16 Jul 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require vb_msg.tcl
require vbgclasses.tcl
require vbgentor.tcl
require vbgrammar.tcl
# End user added include file section
require "importer.tcl"
Class VBImporter : {Importer} {
constructor
method destructor
method generateOopl
method getOoplFileTypesToGenerateFor
method getFileNamesNotToGenerateFor
attribute genSpecialFiles
}
constructor VBImporter {class this} {
set this [Importer::constructor $class $this]
$this genSpecialFiles 0
# Start constructor user section
# End constructor user section
return $this
}
method VBImporter::destructor {this} {
# Start destructor user section
# End destructor user section
$this Importer::destructor
}
method VBImporter::generateOopl {this classes} {
set fileHandler [VBFileHandler new]
$fileHandler sourceTclFiles
set selectedClasses [List new]
foreach class $classes {
if [$class isExternal] {
continue
}
if {[$class getName] == ""} {
m4_warning $W_NONAMECLASS
} else {
$selectedClasses append $class
}
}
set vbGenerator [VBGenerator new]
$vbGenerator ooplModel [$this ooplModel]
$vbGenerator importer $this
set generatedSections [$vbGenerator generate $selectedClasses]
$generatedSections foreach class classToSection {
$classToSection foreach type section {
$fileHandler writeSectionToFile $section $class $type
}
}
# Special files
set import_new [lempty [$this targetObjects]]
if $import_new {
set specialFileList [$fileHandler getSpecialFiles]
} else {
set specialFileList [List new]
set selectedFiles [$this targetObjects]
[$fileHandler getSpecialFiles] foreach specialFile {
if { [lsearch $selectedFiles $specialFile] != -1 } {
$specialFileList append $specialFile
}
}
}
if { ![$specialFileList empty] || [$this genSpecialFiles] } {
if {[M4CheckManager::getErrorCount] > 0} {
m4_error $E_NOSPECFILES
} else {
$vbGenerator generateSpecialFiles $specialFileList
}
}
}
method VBImporter::getOoplFileTypesToGenerateFor {this} {
return "cls frm bas vbp"
}
method VBImporter::getFileNamesNotToGenerateFor {this} {
return "[getCurrentSystemName]"
}
# Do not delete this line -- regeneration end marker