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

  1. #---------------------------------------------------------------------------
  2. #
  3. #    (c) Cadre Technologies Inc. 1995
  4. #
  5. #    File:        %W%
  6. #    Author:        Challenger
  7. #    Description:    Implementation of old Report Writer table Item
  8. #
  9. #---------------------------------------------------------------------------
  10. # SccsId = %W%    %G%    Copyright 1995 Cadre Technologies Inc.
  11.  
  12.  
  13. constructor ItemRecord {class this configVersion phaseVersion systemVersion \
  14.             fileVersion workitem} {
  15.     set this [GCObject::constructor $class $this]
  16.  
  17.     $this _workitem $workitem
  18.     $this _item [$workitem item]
  19.  
  20.     $this project_version [$configVersion versionNumber]
  21.     $this phase_id [[$phaseVersion phase] identity]
  22.     $this system_id [[$systemVersion system] identity]
  23.  
  24.     if { $fileVersion == "" } {
  25.     $this file_id 0
  26.     } else {
  27.     $this file_id [[$fileVersion file] identity]
  28.     }
  29.  
  30.     $this data_type "unknown"
  31.     $this data_type_id 0
  32.  
  33.     return $this
  34. }
  35.  
  36.  
  37. method ItemRecord::item_id {this} {
  38.     return [[$this _workitem] identity]
  39. }
  40.  
  41.  
  42. method ItemRecord::name {this} {
  43.     return [[$this _item] name]
  44. }
  45.  
  46.  
  47. method ItemRecord::scope {this} {
  48.     return [old2newscope [[$this _workitem] scope]]
  49. }
  50.  
  51.  
  52. method ItemRecord::qualifier {this} {
  53.     set qual [[$this _item] qualifier]
  54.     if [$qual isNil] {
  55.     return [ORB::nil]
  56.     }
  57.  
  58.     return [$qual name]
  59. }
  60.  
  61.  
  62. method ItemRecord::qualifier_id {this} {
  63.     set qual [[$this _item] qualifier]
  64.     if [$qual isNil] {
  65.     return 0
  66.     }
  67.  
  68.     return [$qual identity]
  69. }
  70.  
  71.  
  72. method ItemRecord::item_type {this} {
  73.     return [short2longname [$this short_type]]
  74. }
  75.  
  76.  
  77. method ItemRecord::short_type {this} {
  78.     return [[$this _item] type]
  79. }
  80.