////////////////////////////////////////////////////////////////////////// GetEmailRecipients - produce a list of all email addresses referred to in the report. ///////////////////////////////////////////////////////////////////////////
| 463 | // |
| 464 | //////////////////////////////////////////////////////////////////////////////// |
| 465 | static void |
| 466 | GetEmailRecipients(std::vector<TSTRING>& vstrRecipients, const cFCOReport& report, const cTWModeCommon* modeCommon) |
| 467 | { |
| 468 | |
| 469 | // loop through all generes |
| 470 | cFCOReportGenreIter genreIter(report); |
| 471 | for (genreIter.SeekBegin(); !genreIter.Done(); genreIter.Next()) |
| 472 | { |
| 473 | |
| 474 | // loop through all specs |
| 475 | cFCOReportSpecIter specIter(report, genreIter.GetGenre()); |
| 476 | |
| 477 | for (specIter.SeekBegin(); !specIter.Done(); specIter.Next()) |
| 478 | { |
| 479 | |
| 480 | // loop through all email addresses for this spec |
| 481 | cFCOSpecAttrEmailIter emailIter(*specIter.GetAttr()); |
| 482 | |
| 483 | for (emailIter.SeekBegin(); !emailIter.Done(); emailIter.Next()) |
| 484 | { |
| 485 | |
| 486 | TSTRING address = emailIter.EmailAddress(); |
| 487 | std::vector<TSTRING>::iterator i; |
| 488 | |
| 489 | // see if the address is already in the list |
| 490 | i = std::find(vstrRecipients.begin(), vstrRecipients.end(), address); |
| 491 | |
| 492 | if (i == vstrRecipients.end()) |
| 493 | { |
| 494 | vstrRecipients.push_back(address); |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | |
| 502 | static void GetGlobalEmailRecipients(std::vector<TSTRING>& vstrRecipients, |