本文整理汇总了C++中Item::GetAiringStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ Item::GetAiringStatus方法的具体用法?C++ Item::GetAiringStatus怎么用?C++ Item::GetAiringStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item::GetAiringStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckItem
bool Filters::CheckItem(Item& item) {
// Filter my status
for (size_t i = 0; i < my_status.size(); i++)
if (!my_status.at(i) && item.GetMyStatus() == i)
return false;
// Filter airing status
for (size_t i = 0; i < status.size(); i++)
if (!status.at(i) && item.GetAiringStatus() == i + 1)
return false;
// Filter type
for (size_t i = 0; i < type.size(); i++)
if (!type.at(i) && item.GetType() == i + 1)
return false;
// Filter text
vector<wstring> words;
Split(text, L" ", words);
RemoveEmptyStrings(words);
for (auto it = words.begin(); it != words.end(); ++it) {
if (InStr(item.GetTitle(), *it, 0, true) == -1 &&
InStr(item.GetGenres(), *it, 0, true) == -1 &&
InStr(item.GetMyTags(), *it, 0, true) == -1) {
bool found = false;
for (auto synonym = item.GetSynonyms().begin();
!found && synonym != item.GetSynonyms().end(); ++synonym)
if (InStr(*synonym, *it, 0, true) > -1) found = true;
if (item.IsInList())
for (auto synonym = item.GetUserSynonyms().begin();
!found && synonym != item.GetUserSynonyms().end(); ++synonym)
if (InStr(*synonym, *it, 0, true) > -1) found = true;
if (!found) return false;
}
}
// Item passed all filters
return true;
}
示例2: CheckItem
bool Filters::CheckItem(const Item& item) const {
// Filter my status
for (size_t i = 0; i < my_status.size(); i++)
if (!my_status.at(i) && item.GetMyStatus() == i)
return false;
// Filter airing status
for (size_t i = 0; i < status.size(); i++)
if (!status.at(i) && item.GetAiringStatus() == i + 1)
return false;
// Filter type
for (size_t i = 0; i < type.size(); i++)
if (!type.at(i) && item.GetType() == i + 1)
return false;
// Filter text
if (!FilterText(item))
return false;
// Item passed all filters
return true;
}