本文整理汇总了C++中AddressList::DecRef方法的典型用法代码示例。如果您正苦于以下问题:C++ AddressList::DecRef方法的具体用法?C++ AddressList::DecRef怎么用?C++ AddressList::DecRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AddressList
的用法示例。
在下文中一共展示了AddressList::DecRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AutoCollectAddresses
void AutoCollectAddresses(const Message *message,
MAction autocollectFlag,
bool senderOnly,
bool collectNamed,
const String& bookName,
const String& groupName,
wxFrame *frame)
{
static const MessageAddressType addressTypesToCollect[] =
{
// In this array, the values corresponding to 'Sender' headers
// (e.g. From and ReplyTo) must appear before the others. And if
// some other 'sender' headers must be taken into account, the ending
// index in the for loop below (named stopAt) must be changed.
MAT_REPLYTO,
MAT_FROM,
MAT_TO,
MAT_CC,
};
// the email addresses we have already seen
wxArrayString addressesSeen;
const size_t stopAt = senderOnly ? 2 : WXSIZEOF(addressTypesToCollect);
for ( size_t n = 0; n < stopAt; n++ )
{
AddressList *addrList = message->GetAddressList(addressTypesToCollect[n]);
if ( !addrList )
continue;
for ( Address *addr = addrList->GetFirst();
addr;
addr = addrList->GetNext(addr) )
{
const String email = addr->GetEMail();
if ( addressesSeen.Index(email) == wxNOT_FOUND )
{
addressesSeen.Add(email);
AutoCollectAddress(email,
addr->GetName(),
autocollectFlag,
collectNamed,
bookName,
groupName,
frame);
}
}
addrList->DecRef();
}
}