class ::classname{
private variable m_device
private variable m_label
public method getLabel { device } {
return $m_label($device)
}
public method getDevice { label } {
return $m_device($label)
}
constructor { mapList } {
puts "constructor $this"
puts "list: $mapList"
array set m_device [list]
array set m_label [list]
foreach {device label} $mapList {
set m_device($label) $device
set m_label($device) $label
}
}
destructor {
array unset m_device
array unset m_label
}
}
::classname newclassnamevar args
##constructor $this newclassnamevar = $this
##args maplist = args