2 # Tree construction attributes
4 # Testing attribute: TDataStd_TreeNode
6 # Testing command: InitChildNodeIterator
7 # Testing command: ChildNodeMore
9 # Testing command: NewChild
10 # Testing command: AppendNode
15 # Add an attribute to a data framework
17 set aName_Root Label_1
18 Label D ${aLabel_Root}
19 SetName D ${aLabel_Root} ${aName_Root}
22 ###set aChild1 [NewChild D ${aLabel_Root}]
25 SetName D ${aChild1} ${aName1}
28 ###set aChild2 [NewChild D ${aLabel_Root}]
31 SetName D ${aChild2} ${aName2}
33 set aName3 Label_1_1_1
34 ###set aChild3 [NewChild D ${aLabel_Root}]
37 SetName D ${aChild3} ${aName3}
39 set aName4 Label_1_1_2
40 ###set aChild4 [NewChild D ${aLabel_Root}]
43 SetName D ${aChild4} ${aName4}
45 set aName5 Label_1_1_3
46 ###set aChild5 [NewChild D ${aLabel_Root}]
49 SetName D ${aChild5} ${aName5}
51 set aName6 Label_1_2_1
52 ###set aChild6 [NewChild D ${aLabel_Root}]
55 SetName D ${aChild6} ${aName6}
57 set aName7 Label_1_2_2
58 ###set aChild7 [NewChild D ${aLabel_Root}]
61 SetName D ${aChild7} ${aName7}
63 SetNode D ${aLabel_Root}
64 AppendNode D ${aLabel_Root} ${aChild1}
65 AppendNode D ${aLabel_Root} ${aChild2}
66 AppendNode D ${aChild1} ${aChild3}
67 AppendNode D ${aChild1} ${aChild4}
68 AppendNode D ${aChild1} ${aChild5}
69 AppendNode D ${aChild2} ${aChild6}
70 AppendNode D ${aChild2} ${aChild7}
72 # Close/Open the transaction
75 # Forget the attribute
76 ForgetAll D ${aLabel_Root}
78 # Close/Open the transaction
86 # Get a value of the attribute
87 set IsDone [catch {InitChildNodeIterator D ${aLabel_Root} 1} aResult]
88 if { ${IsDone} != 0 } {
90 puts "InitChildNodeIterator Doc TreeNode AllLevels=1 : Error"
93 set aMore [ChildNodeMore]
94 set aMore [lindex ${aMore} 0]
95 if { ${aMore}!= "TRUE" && ${aMore}!= "TRUETRUE" } {
97 puts "InitChildNodeIterator Doc TreeNode AllLevels=1 : Error"
100 puts "InitChildNodeIterator Doc TreeNode AllLevels=1 : OK"