home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cppclldef.tcl
< prev
next >
Wrap
Text File
|
1997-12-01
|
12KB
|
449 lines
#---------------------------------------------------------------------------
#
# Copyright (c) 1997 by Cayenne Software, 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 Cayenne Software, Inc.
#
#---------------------------------------------------------------------------
#
# File : cppclldef.tcl
# Author :
# Original date : November 1997
# Description : Classes for code generation
#
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# File: @(#)cppclassde.tcl /main/titanic/4
#---------------------------------------------------------------------------
# Start user added include file section
# End user added include file section
Class CppClassDef : {GCObject} {
constructor
method destructor
attribute name
attribute clss
attribute attr
}
constructor CppClassDef {class this clss attr} {
set this [GCObject::constructor $class $this]
$this clss $clss
$this attr $attr
# Start constructor user section
# End constructor user section
return $this
}
method CppClassDef::destructor {this} {
# Start destructor user section
# End destructor user section
}
# Do not delete this line -- regeneration end marker
#---------------------------------------------------------------------------
# File: @(#)cppptrdef.tcl /main/titanic/8
#---------------------------------------------------------------------------
# Start user added include file section
# End user added include file section
Class CppPtrDef : {CppClassDef} {
constructor
method destructor
method getIncludeList
method getTypeAttr
method genIsEmpty
method genIsNotEmpty
method genGet
method genSet
method genDtor
method genCtor
}
constructor CppPtrDef {class this clss attr} {
set this [CppClassDef::constructor $class $this $clss $attr]
# Start constructor user section
# End constructor user section
return $this
}
method CppPtrDef::destructor {this} {
# Start destructor user section
# End destructor user section
$this CppClassDef::destructor
}
method CppPtrDef::getIncludeList {this} {
# should return one or more include files necessary for
# implementing this association
return ""
}
method CppPtrDef::getTypeAttr {this} {
# should return the CppType object representing the type
# of the association attribute storage
set attr [$this attr]
set tgt [[$this clss] model]
set type [[[$attr assocAttr] ooplType] generate $tgt]
$type isPointer 1
return $type
}
method CppPtrDef::genIsEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppPtrDef::genIsNotEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppPtrDef::genGet {this attrName} {
# should return the string needed to get something from a one assoc
return ""
}
method CppPtrDef::genSet {this attrName value} {
# should return the string needed to set something from a one assoc
return ""
}
method CppPtrDef::genDtor {this} {
# returns the code needed to destroy the one assoc
return ""
}
method CppPtrDef::genCtor {this} {
# returns the code to create the one assoc
return ""
}
# Do not delete this line -- regeneration end marker
#---------------------------------------------------------------------------
# File: @(#)cppsetdict.tcl /main/titanic/10
#---------------------------------------------------------------------------
# Start user added include file section
# End user added include file section
Class CppSetDictDef : {CppClassDef} {
constructor
method destructor
method getIncludeList
method getTypeAttr
method getTypeGet
method genIsEmpty
method genIsNotEmpty
method genGet
method genAdd
method genRemove
method genIterator
method genDtor
method genCtor
}
constructor CppSetDictDef {class this clss attr} {
set this [CppClassDef::constructor $class $this $clss $attr]
# Start constructor user section
# End constructor user section
return $this
}
method CppSetDictDef::destructor {this} {
# Start destructor user section
# End destructor user section
$this CppClassDef::destructor
}
method CppSetDictDef::getIncludeList {this} {
# should return one or more include files necessary for
# implementing this association
return ""
}
method CppSetDictDef::getTypeAttr {this} {
# should return the CppType object representing the type
# of the association attribute storage
set attr [$this attr]
set tgt [[$this clss] model]
set type [[[$attr assocAttr] ooplType] generate $tgt]
$type isPointer 1
return $type
}
method CppSetDictDef::getTypeGet {this} {
# should return the CppType object which can be used as
# the type of the return value for a get method
return [$this getTypeAttr]
}
method CppSetDictDef::genIsEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppSetDictDef::genIsNotEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppSetDictDef::genGet {this attrName keyName} {
# should return the string needed to get a set from a dict
return ""
}
method CppSetDictDef::genAdd {this attrName keyName value} {
# should return the string needed to add one value to the dict
return ""
}
method CppSetDictDef::genRemove {this attrName keyName value} {
# should return the string needed to remove one key/value
# pair from the dict
return ""
}
method CppSetDictDef::genIterator {this sect loopExpr} {
# should add the code needed to iterate over the complete
# dictionary, executing loopExpr (where $loopVar in the
# expression is replaced by the actual Object)
return ""
}
method CppSetDictDef::genDtor {this} {
# returns the code needed to destroy the dictionary
# (the dictionary is already empty)
return ""
}
method CppSetDictDef::genCtor {this} {
# returns the code to create the dictionary
return ""
}
# Do not delete this line -- regeneration end marker
#---------------------------------------------------------------------------
# File: @(#)cppdictdef.tcl /main/titanic/10
#---------------------------------------------------------------------------
# Start user added include file section
# End user added include file section
Class CppDictDef : {CppClassDef} {
constructor
method destructor
method getIncludeList
method getTypeAttr
method getTypeGet
method genIsEmpty
method genIsNotEmpty
method genGet
method genAdd
method genRemove
method genIterator
method genDtor
method genCtor
}
constructor CppDictDef {class this clss attr} {
set this [CppClassDef::constructor $class $this $clss $attr]
# Start constructor user section
# End constructor user section
return $this
}
method CppDictDef::destructor {this} {
# Start destructor user section
# End destructor user section
$this CppClassDef::destructor
}
method CppDictDef::getIncludeList {this} {
# should return one or more include files necessary for
# implementing this association
return ""
}
method CppDictDef::getTypeAttr {this} {
# should return the CppType object representing the type
# of the association attribute storage
set attr [$this attr]
set tgt [[$this clss] model]
set type [[[$attr assocAttr] ooplType] generate $tgt]
$type isPointer 1
return $type
}
method CppDictDef::getTypeGet {this} {
# should return the CppType object which can be used as
# the type of the return value for a get method
return [$this getTypeAttr]
}
method CppDictDef::genIsEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppDictDef::genIsNotEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppDictDef::genGet {this attrName keyName} {
# should return the string needed to get something from a dict
}
method CppDictDef::genAdd {this attrName keyName value} {
# should return the string needed to add one value to the dict
return ""
}
method CppDictDef::genRemove {this attrName keyName} {
# should return the string needed to remove one key from the dict
return ""
}
method CppDictDef::genIterator {this sect loopExpr} {
# should add the code needed to iterate over the complete
# dictionary, executing loopExpr (where $loopVar in the
# expression is replaced by the actual Object)
return ""
}
method CppDictDef::genDtor {this} {
# returns the code needed to destroy the dictionary
# (the dictionary is already empty)
return ""
}
method CppDictDef::genCtor {this} {
# returns the code to create the dictionary
return ""
}
# Do not delete this line -- regeneration end marker
#---------------------------------------------------------------------------
# File: @(#)cppsetdef.tcl /main/titanic/10
#---------------------------------------------------------------------------
# Start user added include file section
# End user added include file section
Class CppSetDef : {CppClassDef} {
constructor
method destructor
method getIncludeList
method getTypeAttr
method getTypeGet
method genIsEmpty
method genIsNotEmpty
method genGet
method genAdd
method genRemove
method genIterator
method genDtor
method genCtor
}
constructor CppSetDef {class this clss attr} {
set this [CppClassDef::constructor $class $this $clss $attr]
# Start constructor user section
# End constructor user section
return $this
}
method CppSetDef::destructor {this} {
# Start destructor user section
# End destructor user section
$this CppClassDef::destructor
}
method CppSetDef::getIncludeList {this} {
# should return one or more include files necessary for
# implementing this association
return ""
}
method CppSetDef::getTypeAttr {this} {
# should return the CppType object representing the type
# of the association attribute storage
set attr [$this attr]
set tgt [[$this clss] model]
set type [[[$attr assocAttr] ooplType] generate $tgt]
$type isPointer 1
return $type
}
method CppSetDef::getTypeGet {this} {
# should return the CppType object which can be used as
# the type of the return value for a get method
return [$this getTypeAttr]
}
method CppSetDef::genIsEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppSetDef::genIsNotEmpty {this attrName} {
# should return the piece of code use for the compare
return ""
}
method CppSetDef::genGet {this attrName} {
# should return the string needed to get something from a set
return ""
}
method CppSetDef::genAdd {this attrName value} {
# should return the string needed to add one value to the set
return ""
}
method CppSetDef::genRemove {this attrName value} {
# should return the string needed to remove one key from the set
return ""
}
method CppSetDef::genIterator {this sect loopExpr} {
# should add the code needed to iterate over the complete
# set, executing loopExpr (where $loopVar in the
# expression is replaced by the actual Object)
return ""
}
method CppSetDef::genDtor {this} {
# returns the code needed to destroy the set
# (the set is already empty)
return ""
}
method CppSetDef::genCtor {this} {
# returns the code to create the set
return ""
}
# Do not delete this line -- regeneration end marker