| 338 | } |
| 339 | |
| 340 | void cParseNamedAttrList::MergeNoOverwrite(const cParseNamedAttrList* const pal) |
| 341 | { |
| 342 | if (pal) |
| 343 | { |
| 344 | // foreach attribute in pal |
| 345 | for (constListIter newIter = pal->mList.begin(); newIter != pal->mList.end(); ++newIter) |
| 346 | { |
| 347 | // look for this attribute in this list |
| 348 | constListIter thisIter = Find(*newIter); |
| 349 | |
| 350 | // if not already in list, just put it in |
| 351 | if (thisIter == mList.end()) |
| 352 | { |
| 353 | mList.push_back((*newIter)->Clone()); |
| 354 | } |
| 355 | else // do not overwrite value (except for emailto) |
| 356 | { |
| 357 | // special case for emailto: this can have multiple values, so add the new value to the old value |
| 358 | if (0 == (*thisIter)->GetName().compare(TSS_GetString(cTWParser, twparser::STR_PARSER_EMAILTO))) |
| 359 | { |
| 360 | TSTRING tstr = (*thisIter)->GetValue(); |
| 361 | cParserUtil::MergeMailLists(tstr, (*newIter)->GetValue()); |
| 362 | (*thisIter)->SetValue(tstr); |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | const cParseNamedAttr* cParseNamedAttrList::Lookup(const TSTRING& tstrAttrName) const |
| 370 | { |