I am writing an EDA utility, relying on a TCL 8.6 compliant API. My challenge is as follows:
My utility runs on transistors' models in the database, and does some analyisis, using an EDA vendors' TCL API command. I can pass to the TCL commands a TCL procedure name/pointer, and the analysis will rely on my code, rather than the EDA vendors' code. The in-house written proc accepts as an argument a pointer to the specific transistor's instance in the EDA vendor's database.
Now, the EDA vendor allows for TCL 8.6, which means that I want to pass rather than a global proc name, or a namespace proc name, the name/pointer of the specific object's name. How do I do that? In code example:
oo:class create foo {
constructor {} {
variable numy 2
}
method fooshta { mos_pointer } {
puts "now in mosy [get name $mos_pointer ]"
}
destructor {}
}
foo create bar
analyse_tx -proc < how do I refer to bar's method fooshta?>
In a non OOP context, the code would look like:
proc fooshta { mos_pointer } {
puts "now in mosy [get name $mos_pointer ]"
}
analyse_tx -proc fooshta
As can be seen, I am looking for the answer for < how do I refer to bar's method fooshta, so that the EDA tool will invoke it for each transistors' instance? and pass the parameter?>
Thanks.