Add all Info storage into given treenode
bool tree_add_info(TreeNode& trNode, const OriginObject& orgObj, LPCSTR lpcszObjName = NULL, LPCSTR lpcszObjLabel = NULL, int nObjIndex = -1)
TRUE for success
EX1
void tree_add_info_ex1() { Tree tr; Worksheet wks("Data1"); wks.Create(); Column cc = wks.Columns(0); string strName ; cc.GetName(strName); string strLabe = "Col1_Label"; cc.SetLabel(strLabe); cc.Info.Add("test"); storage st; st = cc.GetStorage("test"); Tree trTemp; TreeNode spring; spring = trTemp.AddTextNode("first","Spring",1); st.SetSection("params",trTemp); string strVal; if( tree_add_info(tr, cc, strName, strLabe) ) { tr.A.GetAttribute(STR_LABEL_ATTRIB,strVal); out_str(strVal); TreeNode tn1, tn2; tn1 = tr.a.GetNode("TEST.PARAMS"); if(tn1.IsValid()) { tn2 = tn1.GetNode("SPRING"); out_str(tn2.strVal); } } tr.A.Remove(); }
origin.h