SICS-188 hdb_path is now a comma separated list of paths.
NOTE: nodes listed as derived parameter dependencies aren't added to the path. r2673 | ffr | 2008-08-07 16:43:57 +1000 (Thu, 07 Aug 2008) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
2567cde82b
commit
7c7ed6cbf9
@@ -16,6 +16,8 @@ InstallHdb
|
||||
namespace eval ::hdb {
|
||||
namespace export buildHDB attlist
|
||||
|
||||
set sobjadd_state(depends) false
|
||||
|
||||
set NXlog_template {
|
||||
NXlog {
|
||||
$name {
|
||||
@@ -462,6 +464,8 @@ proc ::hdb::add_feedback {hpath sobj name} {
|
||||
#\tor "node nnn kind kkk long_name junk prop_list {propA aaa propB bbb ...}"
|
||||
proc ::hdb::add_node {basePath args} {
|
||||
global nodeindex
|
||||
variable sobjadd_state
|
||||
|
||||
array unset arg_array
|
||||
if [ catch {
|
||||
array set arg_array $args
|
||||
@@ -492,7 +496,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
}
|
||||
if {[lsearch [hlist $basePath] $node_name] == -1} {
|
||||
#TODO allow hdb nodes of type drivable countable environment
|
||||
array set attribute [attlist $node_name]
|
||||
array set attribute [::utility::normalattlist $node_name]
|
||||
switch $arg_array(kind) {
|
||||
command {
|
||||
# A command is a macro, node=macro name
|
||||
@@ -527,7 +531,7 @@ proc ::hdb::add_node {basePath args} {
|
||||
hsetprop $node_path klass [getatt $node_name klass]
|
||||
if [info exists attribute(hdbchain)] {
|
||||
foreach pmot [split $attribute(hdbchain) ,] {
|
||||
hchain $node_path [getatt $pmot hdb_path]
|
||||
hchain $node_path [lindex [split [getatt $pmot hdb_path] ,] 0]
|
||||
}
|
||||
}
|
||||
foreach child [hlist $node_path] {
|
||||
@@ -567,10 +571,16 @@ proc ::hdb::add_node {basePath args} {
|
||||
}
|
||||
if {[info exists attribute(depends)]} {
|
||||
foreach dep [split [normalgetatt $node_name depends] , ] {
|
||||
set sobjadd_state(depends) true
|
||||
::hdb::sobjadd $node_path $dep
|
||||
set sobjadd_state(depends) false
|
||||
}
|
||||
}
|
||||
sicslist setatt $node_name hdb_path $node_path
|
||||
if { $sobjadd_state(depends) == false && [info exists attribute(hdb_path)] } {
|
||||
sicslist setatt $node_name hdb_path $attribute(hdb_path),$node_path
|
||||
} else {
|
||||
sicslist setatt $node_name hdb_path $node_path
|
||||
}
|
||||
return $node_path
|
||||
}
|
||||
} message ] {
|
||||
|
||||
Reference in New Issue
Block a user