本文整理汇总了C++中ZapitChannelList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ZapitChannelList::clear方法的具体用法?C++ ZapitChannelList::clear怎么用?C++ ZapitChannelList::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZapitChannelList
的用法示例。
在下文中一共展示了ZapitChannelList::clear方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getRadioChannels
bool CZapitBouquet::getRadioChannels(ZapitChannelList &list, int flags)
{
list.clear();
for (ZapitChannelList::iterator it = radioChannels.begin(); it != radioChannels.end(); ++it) {
if ((*it)->flags & flags)
list.push_back(*it);
}
return (!list.empty());
}
示例2: GetAllSatelliteChannels
bool CServiceManager::GetAllSatelliteChannels(ZapitChannelList &list, t_satellite_position position)
{
list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); it++) {
if(it->second.getSatellitePosition() == position)
list.push_back(&(it->second));
}
return (list.size() != 0);
}
示例3: GetAllNewChannels
bool CServiceManager::GetAllNewChannels(ZapitChannelList &list)
{
list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); it++) {
if (it->second.isNewChannel)
list.push_back(&(it->second));
}
return (list.size() != 0);
}
示例4: GetAllTvChannels
bool CServiceManager::GetAllTvChannels(ZapitChannelList &list)
{
list.clear();
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); it++) {
if (it->second.getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE)
list.push_back(&(it->second));
}
return (list.size() != 0);
}
示例5: getChannels
bool CZapitBouquet::getChannels(ZapitChannelList &list, bool tv, int flags)
{
list.clear();
ZapitChannelList *current = tv ? &tvChannels : &radioChannels;
for (ZapitChannelList::iterator it = current->begin(); it != current->end(); ++it) {
if ((*it)->flags & flags)
list.push_back(*it);
}
return (!list.empty());
}
示例6: func_set_bouquet_edit_form
//-------------------------------------------------------------------------
// func: Bouquet Edit
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_set_bouquet_edit_form(CyhookHandler *hh, std::string)
{
if (!(hh->ParamList["selected"].empty()))
{
int selected = atoi(hh->ParamList["selected"].c_str()) - 1;
int mode = NeutrinoAPI->Zapit->getMode();
ZapitChannelList* channels = mode == CZapitClient::MODE_TV ? &(g_bouquetManager->Bouquets[selected]->tvChannels) : &(g_bouquetManager->Bouquets[selected]->radioChannels);
for(int j = 0; j < (int) channels->size(); j++) {
hh->ParamList["bouquet_channels"] +=
string_printf("<option value=\""
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
"\">%s</option>\n",
(*channels)[j]->channel_id,
(*channels)[j]->getName().c_str());
}
ZapitChannelList Channels;
Channels.clear();
if (mode == CZapitClient::MODE_RADIO) {
for (tallchans_iterator it = allchans.begin(); it != allchans.end(); it++)
if (it->second.getServiceType() == ST_DIGITAL_RADIO_SOUND_SERVICE)
Channels.push_back(&(it->second));
} else {
for (tallchans_iterator it = allchans.begin(); it != allchans.end(); it++)
if (it->second.getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE)
Channels.push_back(&(it->second));
}
sort(Channels.begin(), Channels.end(), CmpChannelByChName());
for (int i = 0; i < (int) Channels.size(); i++) {
if (!g_bouquetManager->existsChannelInBouquet(selected, Channels[i]->channel_id)){
hh->ParamList["all_channels"] +=
string_printf("<option value=\""
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
"\">%s</option>\n",
Channels[i]->channel_id,
Channels[i]->getName().c_str());
}
}
return "";
}
else
return "No Bouquet selected";
}
示例7: func_set_bouquet_edit_form
//-------------------------------------------------------------------------
// func: Bouquet Edit
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_set_bouquet_edit_form(CyhookHandler *hh, std::string)
{
if (!(hh->ParamList["selected"].empty()))
{
int selected = atoi(hh->ParamList["selected"].c_str()) - 1;
int mode = NeutrinoAPI->Zapit->getMode();
ZapitChannelList* channels = mode == CZapitClient::MODE_TV ? &(g_bouquetManager->Bouquets[selected]->tvChannels) : &(g_bouquetManager->Bouquets[selected]->radioChannels);
for(int j = 0; j < (int) channels->size(); j++) {
hh->ParamList["bouquet_channels"] +=
string_printf("<option value=\""
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
"\">%s</option>\n",
(*channels)[j]->channel_id,
(*channels)[j]->getName().c_str());
}
ZapitChannelList Channels;
Channels.clear();
if (mode == CZapitClient::MODE_RADIO)
CServiceManager::getInstance()->GetAllRadioChannels(Channels);
else
CServiceManager::getInstance()->GetAllTvChannels(Channels);
sort(Channels.begin(), Channels.end(), CmpChannelByChName());
for (int i = 0; i < (int) Channels.size(); i++) {
if (!g_bouquetManager->existsChannelInBouquet(selected, Channels[i]->channel_id)){
hh->ParamList["all_channels"] +=
string_printf("<option value=\""
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
"\">%s</option>\n",
Channels[i]->channel_id,
Channels[i]->getName().c_str());
}
}
return "";
}
else
return "No Bouquet selected";
}