本文整理汇总了C++中CEpgInfoTag::SetNextEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpgInfoTag::SetNextEvent方法的具体用法?C++ CEpgInfoTag::SetNextEvent怎么用?C++ CEpgInfoTag::SetNextEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpgInfoTag
的用法示例。
在下文中一共展示了CEpgInfoTag::SetNextEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Sort
void CEpg::Sort(void)
{
CSingleLock lock(m_critSection);
if (m_bInhibitSorting)
return;
/* sort the EPG */
sort(begin(), end(), sortEPGbyDate());
/* reset the previous and next pointers on each tag */
int iTagAmount = size();
for (int ptr = 0; ptr < iTagAmount; ptr++)
{
CEpgInfoTag *tag = at(ptr);
if (ptr == 0)
{
tag->SetPreviousEvent(NULL);
}
if (ptr > 0)
{
CEpgInfoTag *previousTag = at(ptr-1);
previousTag->SetNextEvent(tag);
tag->SetPreviousEvent(previousTag);
}
if (ptr == iTagAmount - 1)
{
tag->SetNextEvent(NULL);
}
}
}
示例2: UpdatePreviousAndNextPointers
void CEpg::UpdatePreviousAndNextPointers(void)
{
int iTagAmount = size();
for (int ptr = 0; ptr < iTagAmount; ptr++)
{
CEpgInfoTag *tag = at(ptr);
if (ptr == 0)
{
/* first tag has no previous event */
tag->SetPreviousEvent(NULL);
}
else
{
/* set the next event in the previous tag */
CEpgInfoTag *previousTag = at(ptr-1);
previousTag->SetNextEvent(tag);
/* set the previous event in this tag */
tag->SetPreviousEvent(previousTag);
}
if (ptr == iTagAmount - 1)
{
/* ensure that the next event for the last tag is set to NULL */
tag->SetNextEvent(NULL);
}
}
}