home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / cclassdbob.tcl < prev    next >
Text File  |  1996-06-12  |  2KB  |  93 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)cclassdbob.tcl    /main/3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)cclassdbob.tcl    /main/3   12 Jun 1996 Copyright 1996 Cadre Technologies Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "browsdbobj.tcl"
  15.  
  16. Class CClassDbObj : {BrowsDbObj ControlledClass} {
  17.     method destructor
  18.     constructor
  19.     method promoter
  20.     method getRuleUiObj
  21.     method setRuleUiObj
  22.     method removeRuleUiObj
  23.     attribute RuleUiObj
  24. }
  25.  
  26. method CClassDbObj::destructor {this} {
  27.     # Start destructor user section
  28.     # End destructor user section
  29.     $this BrowsDbObj::destructor
  30. }
  31.  
  32. constructor CClassDbObj {class this name} {
  33.     set this [ControlledClass::constructor $class $this $name]
  34.     set this [BrowsDbObj::constructor $class $this $name]
  35.     return $this
  36. }
  37.  
  38. selfPromoter ControlledClass {this} {
  39.     CClassDbObj promote $this
  40. }
  41.  
  42. method CClassDbObj::promoter {this} {
  43.     $this BrowsDbObj::promoter
  44.  
  45.     $this RuleUiObj [Dictionary new]
  46. }
  47.  
  48. proc CClassDbObj::associations {} {
  49.     return {rules}
  50. }
  51.  
  52. proc CClassDbObj::childTypes {assoc} {
  53.     if {[lsearch -exact "[CClassDbObj::associations]" "$assoc"] == -1} {
  54.     return ""
  55.     }
  56.  
  57.     set childTypes [BrowserProcs::childTypes $assoc]
  58.     case "$childTypes" in {
  59.     {AccessRule} {
  60.         return {ownRight}
  61.     }
  62.     {default} {
  63.          return "$childTypes"
  64.     }
  65.     }
  66. }
  67.  
  68. proc CClassDbObj::controlledLists {} {
  69.     return ""
  70. }
  71.  
  72. proc CClassDbObj::infoProperties {} {
  73.     return [concat \
  74.     [BrowserProcs::infoProperties] \
  75.     {"Controlled Actions"} \
  76.     ]
  77. }
  78.  
  79. # Do not delete this line -- regeneration end marker
  80.  
  81. method CClassDbObj::getRuleUiObj {this ruleId} {
  82.     return [[$this RuleUiObj] set $ruleId]
  83. }
  84.  
  85. method CClassDbObj::setRuleUiObj {this ruleId newRuleUiObj} {
  86.     [$this RuleUiObj] set $ruleId $newRuleUiObj
  87. }
  88.  
  89. method CClassDbObj::removeRuleUiObj {this ruleId} {
  90.     [$this RuleUiObj] unset $ruleId
  91. }
  92.  
  93.