📄 showcasepropandrelationship.tcl
字号:
proc ShowCaseProp {id} { global fp puts $fp " <---- properties ----" puts $fp " npiType=[npi_get $id -npiType]" puts $fp " npiFile=[npi_get $id -npiFile]" puts $fp " npiLineNo=[npi_get $id -npiLineNo]" puts $fp " npiCaseType=[npi_get $id -npiCaseType]" puts $fp " >---- properties ----"}proc foreach_Iterate {iter_handle iter_type} { global fp puts $fp " <---$iter_type --->" set Object_Handle [npi_scan $iter_handle] while {$Object_Handle != "NULL"} { puts $fp " <---begin npi_scan \$iter_handle--->" puts $fp " npiType = [npi_get $Object_Handle -npiType]" puts $fp " npiFile = [npi_get $Object_Handle -npiFile]" puts $fp " npiLineNo = [npi_get $Object_Handle -npiLineNo]" puts $fp " <---end of npi_scan \$iter_handle--->" set Object_Handle [npi_scan $iter_handle] } puts $fp " <---end of $iter_type --->"}proc foreach_CaseItem {iter_handle iter_type} { global fp puts $fp " <---$iter_type --->" set Object_Handle [npi_scan $iter_handle] while {$Object_Handle != "NULL"} { puts $fp " <---begin npi_scan \$iter_handle--->" puts $fp " npiType = [npi_get $Object_Handle -npiType]" puts $fp " npiFile = [npi_get $Object_Handle -npiFile]" puts $fp " npiLineNo = [npi_get $Object_Handle -npiLineNo]" set expr_iter [npi_iterate $Object_Handle -npiType npiExpr] foreach_Iterate $expr_iter "npi_iterate \$Object_Handle -npiType npiExpr" set stmt [npi_handle $Object_Handle -npiType npiStmt] ShowHandleProp $stmt "npi_handle \$Object_Handle -npiType npiStmt" puts $fp " <---end of npi_scan \$iter_handle--->" set Object_Handle [npi_scan $iter_handle] } puts $fp " <---end of $iter_type --->"}proc ShowHandleProp {Handle type} { global fp puts $fp " <---$type --->" puts $fp " Type = [npi_get $Handle -npiType]" puts $fp " LineNo = [npi_get $Handle -npiLineNo]" puts $fp " <---end of $type --->"}proc ShowCaseRelationship {id} { global fp puts $fp " <---relationship --->" set Iter [npi_iterate $id -npiType npiCaseItem] foreach_CaseItem $Iter "npi_iterate \$id -npiType npiCaseItem" set handle [npi_handle $id -npiType npiCondition] ShowHandleProp $handle "npi_handle \$id -npiType npiCondition" puts $fp " <---end of relationship --->"}proc ShowCasePropAndRelationship {} { global g_Case global fp set var $g_Case puts $fp "<---begin showing case information--->" ShowCaseProp $var ShowCaseRelationship $var puts $fp "<---end of showing case information--->"}set log_file [file join [file dirname [info script]] [file tail [info script]].out]set fp [open $log_file w]fconfigure $fp -buffering nonenpi_register_cb -npiModuleBased Case ShowCasePropAndRelationshipnpi_traverse_model -npiModuleBasedclose $fp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -