namespace eval ::scobj { } proc ::scobj::set_required_props {hpath} { foreach child [hlist $hpath] { hsetprop $hpath/$child data false ::scobj::set_required_props $hpath/$child } } proc ::scobj::hinit_nodeprops {node hpath} { hsetprop $hpath nxalias $node foreach {prop propval} [subst { control true data true nxsave true mutable true klass parameter sdsinfo ::nexus::scobj::sdsinfo long_name $node }] { if {[hpropexists $hpath $prop] == false} { hsetprop $hpath $prop $propval } } } proc ::scobj::hinit_scobjprops {scobj hpath} { if {[hpropexists $hpath klass]} { sicslist setatt $scobj klass [hgetpropval $hpath klass] } if {[hpropexists $hpath long_name]} { sicslist setatt $scobj long_name [hgetpropval $hpath long_name] } else { sicslist setatt $scobj long_name $scobj } hsetprop $hpath sicsdev $scobj ::scobj::hinit_nodeprops $scobj $hpath } ## # @brief Initialise the hdb properties required for generating the GumTree interface and # saving data for script context objects # @param scobj, name of script context object # @param par, optional parameter proc ::scobj::hinitprops {scobj {par "@none"}} { if {$par == "@none"} { set hpath /sics/$scobj ::scobj::hinit_scobjprops $scobj $hpath } else { set hpath /sics/$scobj/$par ::scobj::hinit_nodeprops ${scobj}_$par $hpath } }