home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cppimporte.tcl
< prev
next >
Wrap
Text File
|
1997-07-30
|
2KB
|
87 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)cppimporte.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cppimporte.tcl /main/titanic/2 30 Jul 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require cppgclasses.tcl
require cppgrammar.tcl
require cppgentor.tcl
# End user added include file section
require "importer.tcl"
Class CppImporter : {Importer} {
constructor
method destructor
method importNew
method generateOopl
method getOoplFileTypesToGenerateFor
}
constructor CppImporter {class this} {
set this [Importer::constructor $class $this]
# Start constructor user section
# End constructor user section
return $this
}
method CppImporter::destructor {this} {
# Start destructor user section
# End destructor user section
$this Importer::destructor
}
method CppImporter::importNew {this} {
$this Importer::importNew
set fileHandler [CppFileHandler new]
set cppGenerator [CppGenerator new]
set specialFileList [$fileHandler getMakefileName]
if {![lempty $specialFileList]} {
$cppGenerator generateSpecialFiles $specialFileList
}
}
method CppImporter::generateOopl {this classes} {
set fileHandler [CppFileHandler 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 cppGenerator [CppGenerator new]
set generatedSections [$cppGenerator generate $selectedClasses]
$generatedSections foreach class classToSection {
$classToSection foreach type section {
$fileHandler writeSectionToFile $section $class $type
}
}
}
method CppImporter::getOoplFileTypesToGenerateFor {this} {
return {{c++} {h++}}
}
# Do not delete this line -- regeneration end marker