Get a new value of an attribute, which doesn't duplicate any exist one, based on prefix and postfix string
string tree_get_enum_attribute_value( TreeNode & trNode, string strAttribute, string strPrefix, string strPostfix = "" )
string of enumerating attribute value
EX1
void tree_get_enum_attribute_value_ex1() { string strAttribute = "OriginLab"; Tree trTest; TreeNode tnNum, tnStr, tnDouble; tnNum = trTest.AddNumericNode( 3 ); tnNum.SetAttribute( strAttribute, "Text" ); tnStr = trTest.AddTextNode( "Hehe" ); tnStr.SetAttribute( strAttribute, "Text1" ); tnDouble = trTest.AddNumericNode( 32.323 ); tnDouble.SetAttribute( strAttribute, "Text2" ); string strPrefix, strValue, strPostfix; strPrefix = "Text"; strPostfix = ""; strValue = tree_get_enum_attribute_value( trTest, strAttribute, strPrefix, strPostfix); //it should output "Text3" out_str(strValue); }
origin.h